Monads/Maybe monad: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) m (Fix Perl 6 -> Raku in comments) |
||
Line 953:
{{works with|Rakudo|2019.11}}
It is exceptionally difficult to come up with a compelling valuable use for
a Maybe monad in
exceptions and/or only allow a single point of entry/exit from a subroutine.
Line 962:
The task description asks for two functions that take an Int and return a Maybe
Int or Maybe Str, but those distinctions are nearly meaningless in
below.
Line 976:
$monad is both an Int '''and''' a Str. It exists in a sort-of quantum state
where what-it-is depends on how-it-is-used. Bolting on some 'Monad' type to do
this will only ''remove'' functionality that
Ok, say you have a situation where you absolutely do not want an incalculable
|