[Haskell-beginners] Common Method for [Maybe a] -> [a]

Leonhard Applis Leonhard.Applis at protonmail.com
Wed May 1 11:04:46 UTC 2019


Hey there,

I've got a method:

demaybefy  :: [Maybe  a] -> [a]
demaybefy []  =  []
demaybefy (x:xs) =  case x of
Just x -> x : demaybefy xs
Nothing  -> demaybefy xs


However, i feel that there is a method from preload/list/maybe that does exactly the same, but i cannot find it.
Can someone help me?

best regards
Leonhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20190501/34cbcdd8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - Leonhard.Applis at protonmail.com - 0x807FDDF3.asc
Type: application/pgp-keys
Size: 1844 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20190501/34cbcdd8/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 509 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20190501/34cbcdd8/attachment.sig>


More information about the Beginners mailing list