Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Common Method for [Maybe a] -> [a] (Leonhard Applis) 2. Re: Common Method for [Maybe a] -> [a] (Simon Jakobi) ---------------------------------------------------------------------- Message: 1 Date: Wed, 01 May 2019 11:04:46 +0000 From: Leonhard Applis <leonhard.app...@protonmail.com> To: "beginners@haskell.org" <beginners@haskell.org> Subject: [Haskell-beginners] Common Method for [Maybe a] -> [a] Message-ID: <jEPsGutPSPewHEZkEsxZbZWuvjJVJXqMK8wkriErvz0IjxBdiRWCrXD8CXXad-A-xZLlMgd0tfcx2W2YwILBZgLLPmyQkpV6hQRLAOTzhK0=@protonmail.com> Content-Type: text/plain; charset="utf-8" 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-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: publickey - leonhard.app...@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-0001.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-0001.sig> ------------------------------ Message: 2 Date: Wed, 1 May 2019 13:24:54 +0200 From: Simon Jakobi <simon.jak...@googlemail.com> To: Leonhard Applis <leonhard.app...@protonmail.com>, The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Common Method for [Maybe a] -> [a] Message-ID: <CAGtp2SjMiDX1Xx=f9pusthnngcbkdlcyfoj9fxtu8c--t3w...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Leonhard, the function is called catMaybes. Hoogle is a good way to find it: https://hoogle.haskell.org/?hoogle=%5BMaybe+a%5D+-%3E+%5Ba%5D Cheers, Simon Am Mi., 1. Mai 2019 um 13:05 Uhr schrieb Leonhard Applis < leonhard.app...@protonmail.com>: > 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 > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20190501/e4bbde11/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 131, Issue 1 *****************************************