Send Beginners mailing list submissions to
[email protected]
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
[email protected]
You can reach the person managing the list at
[email protected]
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 <[email protected]>
To: "[email protected]" <[email protected]>
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 - [email protected] - 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 <[email protected]>
To: Leonhard Applis <[email protected]>, The
Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
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 <
[email protected]>:
> 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
> [email protected]
> 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
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 131, Issue 1
*****************************************