Skip to content

Commit

Permalink
Improve documentation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
saschagrunert committed Mar 3, 2018
1 parent e98b219 commit 54acfbe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ The type can be used like this:

MAYBE(int, foo);

/* Alternatively, if you dont need the 'foo' synonym:
* MAYBE_TYPE(int); */

int main(void) {
Maybe(foo) maybeFoo = Just_foo(2);

Expand Down Expand Up @@ -67,6 +70,9 @@ also means "correct").
EITHER(int, foo, char, bar);
/* Alternatively, if you dont need the 'foo' and 'bar' synonyms:
* EITHER_TYPE(int, char); */
int main(void) {
Either(foo, bar) eitherFooOrBar = Right_foo_bar('a');
Expand Down

0 comments on commit 54acfbe

Please sign in to comment.