Open benner opened 6 months ago
@benner IIRC it's correct / expected, as then
is designed to be "smarter" in a sense (at least, more functionally flexible), while Compose
is meant to do pure function composition (i.e., not unwrapping the result of a previous monadic computation before passing it to the next chained function).
At least, that's what the then
function's documentation on the either
page, in conjunction with the description of Compose
in the reader
doc suggest to me. I'm new to the library, though, so take w/ grain of salt.
Playing with library and and got confused.
Code:
Firs two prints works as expected:
but last one gives error:
Is this expected?