Add ifThenElse and (?) to Data.Bool
Henning Thielemann
lemming at henning-thielemann.de
Thu Nov 17 10:19:55 UTC 2016
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)
More information about the Libraries
mailing list