Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhedonia authored May 11, 2017
1 parent b74bd02 commit e7989be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ if(!x.hasValue) {
```c++
int sum(int x, int y){ return x+y; }
auto monadicSum = lift(sum); // Maybe<int> MonadicSum(Maybe<int>, Maybe<int>)
//...
auto monadicSum = lift(sum); // transforms sum to: Maybe<int> MonadicSum(Maybe<int>, Maybe<int>)
ASSERT_TRUE( monadicSum( maybe(5) , maybe(7) ).get(0) == 12 );
ASSERT_TRUE( monadicSum( maybe(), maybe(1) ).hasValue == false);
Expand Down

0 comments on commit e7989be

Please sign in to comment.