|
|
|
|
|
by tikhonj
4807 days ago
|
|
That particular syntax makes much more sense when you have functions that return a Maybe value: do a <- getA "foo" "bar"
b <- getB "foo" a
...
I used a deliberately overly simple example so I could go on from do-notation--which many people are already familiar with--to applicatives and idiom brackets.Besides, it looks like any normal program, except you're using <- to define variables rather than =. Can't see how it could be any clearer than that. |
|
I like the Maybe concept and non-nullable types; I just think being able to overload operators like "=" and ";" in C++ and Haskell is optimizing writability over readability and in most cases, readability is by far the more important attribute.