3 ms·
That'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 th
by lmm 7y ago
That'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...