[Haskell-cafe] Re: 'par' - why has it the type a -> b -> b ?

Achim Schneider barsoap at web.de
Mon Sep 29 10:53:02 EDT 2008


Henning Thielemann <lemming at henning-thielemann.de> wrote:

par2 :: (a -> b -> c) -> a -> b -> c
> > par2 f x y =
> >    f x (par x y) 

($!)    :: (a -> b) -> a -> b
f $! x  = x `seq` f x

It's terseness vs. maximum composability. I don't even want to think
about implementing seq in terms of $!, makes my brain twist.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or broadcasting of this signature prohibited.



More information about the Haskell-Cafe mailing list