3 ms·
And here we see exactly why implementing a specific function on a specific instance of a monad isn't the answer - two users of two different, well-respected fun
by geofft 7y ago
And here we see exactly why implementing a specific function on a specific instance of a monad isn't the answer - two users of two different, well-respected functional languages can't communicate.
- lmm 7y agoThat's completely backwards - the confusion here is precisely because the function is not implemented, if it was present in Rust (with a type signature) then there would have been no misunderstanding. (There was also a mistake in the original statement - fold is nothing to do with monads)
- foldr 7y agoThe function is implemented for option types in Rust, it's just not called 'fold', because there's no universal convention according to which functions with that signature are folds. https://doc.rust-lang.org/std/option/enum.Option.html#method.map_or_else https://doc.rust-lang.org/std/option/enum.Option.html#method...