Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation for option types #432

Merged
merged 3 commits into from
May 23, 2016

Conversation

kikofernandez
Copy link
Contributor

this adds documentation for options types. fixes #289

this adds documentation for options types. fixes #289
is bigger than @code{0} and @code{Nothing} otherwise.

@codeblock|{
def test_if_bigger_than_cero(x: int): Maybe String {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A typo I think def test_if_bigger_than_zero(....)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhucVH888: you have to start fixing these problems as you find them, rather than initiating pointless discussion about them.

Using option types is simple. Meaningful values are wrapped inside
the @code{Just} data constructor (e.g. @code{Just 32}); values
that are of no importance are written as @code{Nothing}.

Copy link
Contributor

@PhucVH888 PhucVH888 May 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to connect single sentences like this.
Option types, or Maybe types are polymorphic types that represent optional values. Using option types is simple. Meaningful values are wrapped inside @code{Just} data constructor (e.g. @code{Just 32}), or values that are of no importance are written by @code{Nothing} data constructor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing is not unimportant. "Option types, (sometimes called 'Maybe types') are polymorphic types that represent optional values. Using option types is simple: a values is wrapped inside a @code{Just} data constructor (e.g. @code{Just 32}), while @code{Nothing} presents an absent value."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The online editor is quite simple but powerful. Please feel free to use the editor and update the wording in this PR. I have already fixed the aforementioned issues

@kikofernandez
Copy link
Contributor Author

To everyone: Please feel free to update the initial documentation with a better wording. I think it makes more sense that, when you see the error, you create a commit and push it to this branch :)

@EliasC
Copy link
Contributor

EliasC commented May 23, 2016

Merging this in a bit if there are no more comments

@PhucVH888
Copy link
Contributor

@EliasC I think it's fine. You can merge it.

@EliasC EliasC merged commit e0f794b into parapluu:development May 23, 2016
@EliasC EliasC deleted the doc/option-types branch May 23, 2016 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some tiny bugs in examples of encore's document
5 participants