[Haskell-cafe] Typing in haskell and mathematics

Henning Thielemann lemming at henning-thielemann.de
Tue Feb 1 14:00:24 EST 2005


On Mon, 31 Jan 2005, Henning Thielemann wrote:

> On Mon, 31 Jan 2005 karczma at info.unicaen.fr wrote:
> 
> > The double ordering:   a < b < c
> 
> By the way there is a nice functional implementation of a < b < c:
> 
> zapWith :: [a -> a -> b] -> [a] -> [b]
> zapWith fs xs = zipWith3 id fs xs (tail xs)
> 
> usage:
> 
> and zapWith [  (<),  (<)  ]
>             [a,    b,    c]
> 

sorry, must be

and $ zapWith [  (<),  (<)  ]
              [a,    b,    c]


More information about the Haskell-Cafe mailing list