Monads/Maybe monad: Difference between revisions
m
Rewrote a comment/
m (Added language identifier and moved a comment.) |
m (Rewrote a comment/) |
||
Line 996:
The class has static methods, "of" and "ofNullable", which act as the unit function
for wrapping nullable and non-nullable values respectively.
The class instance method, "flatMap", acts as the bind function.
<syntaxhighlight lang="java">
|