3 ms·
I've only looked at Rust in passing, but looking at the documentation, that example is pretty trivial. '.map' maps over the option. '.and_then' is the monadic
by jhomedall 10y ago
I've only looked at Rust in passing, but looking at the documentation, that example is pretty trivial.
'.map' maps over the option. '.and_then' is the monadic bind operation, that you find in pretty much every modern programming language (frequently named 'flatMap'; even Java has this nowadays).