4 ms·
Maybe a is a value that may or may not contain an a within it. So how would you convert that to an a, which definitely has an a in it? What you can do, is pass
by Peaker 13y ago
Maybe a is a value that may or may not contain an a within it. So how would you convert that to an a, which definitely has an a in it?
What you can do, is pass a callback to a function that handles the case where you do have an "a" in the Maybe. And that's basically what fmap, <$>, and >>= do.