On 4 October 2010 10:55, Bulat Ziganshin <bulat.zigans...@gmail.com> wrote: > Hello Ketil, > > Monday, October 4, 2010, 11:30:48 AM, you wrote: >>> Prelude> (if then "Haskell" else "Cafe") False > > lambda-if is easily implemented in terms of usual functions. > and we even have one named bool: > > bool: Bool -> a -> a -> a
I agree, in fact I have bool here: http://hackage.haskell.org/packages/archive/higherorder/0.0/doc/html/Data-Bool-Higher.html And the corresponding other types: bool :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b list :: b -> ([a] -> b) -> [a] -> b maybe :: b -> (a -> b) -> Maybe a -> b But the case is especially useful for pattern matching. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe