Add ifThenElse and (?) to Data.Bool
Elliot Cameron
eacameron at gmail.com
Thu Nov 17 14:41:36 UTC 2016
FWIW, Winter, I sorta like that operator and it is even readable to people
who use C, JS, etc. Thanks for the library. :)
ᐧ
On Thu, Nov 17, 2016 at 7:19 AM, winter <drkoster at qq.com> wrote:
> I decide to make a standalone package: http://hackage.
> haskell.org/package/if
>
> Cheers!
> Winter
>
> On 17 Nov 2016, at 18:19, Henning Thielemann <
> lemming at henning-thielemann.de> wrote:
>
>
> On Thu, 17 Nov 2016, Yitzchak Gale wrote:
>
> Anyway, bool is the natural parameter order in Haskell.
> I'll make more explicit what others have already said, with
> this analogy:
>
> maybe (if it fails) (if it succeeds) (input data)
> either (if it fails) (if it succeeds) (input data)
>
>
> foldl (if it's null) (if it's not null) (input data)
> foldr (if it's null) (if it's not null) (input data)
>
>
> Unfortunately, it is the other way round:
>
> foldl (if it's not null) (if it's null) (input data)
> foldr (if it's not null) (if it's null) (input data)
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161117/787061a6/attachment.html>
More information about the Libraries
mailing list