3 ms·
Nice, every language should have a Result/Either Monad. Why not make it a functor too and add map()? ok(1) |> map(fn v -> v + 1 end) # ok(2) Of course you c
by bertylicious 5y ago
Nice, every language should have a Result/Either Monad.
Why not make it a functor too and add map()?
ok(1) |> map(fn v -> v + 1 end)
# ok(2)
Of course you can also make it a bifunctor by implementing bimap().
And what about filter()?
- linkdd 5y agoCould be planned for the 0.4.0 :) Honestly it was made just to scratch an itch I had for a while.