-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
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 { |
There was a problem hiding this comment.
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(....)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix!
There was a problem hiding this comment.
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}. | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
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 :) |
Merging this in a bit if there are no more comments |
@EliasC I think it's fine. You can merge it. |
this adds documentation for options types. fixes #289