Talk:Monads/Maybe monad: Difference between revisions

(Perhaps a specific task and test values ?)
 
Line 1:
==Perhaps a specific task ?==
 
It can help comparison across languages if there is a specific task with a readily intelligible motivation. OneProviding candidatea mightspecific beset to:of inputs and expected outputs can make the code even more directly comparable.
 
One candidate might be to:
# Create and compose safe versions (number -> Maybe number) of 3 partial functions (reciprocal, sqrt, log)
# Show the results of applying the required composition to a specific set of input values. In the ES5 JavaScript example, I have used, for instance [-2, -1, -0.5, 0, 1 / Math.E, 1, 2, Math.E, 3, 4, 5]
9,655

edits