[Haskell] Force evaluation

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Mon Dec 6 11:34:29 EST 2004


Ben Rudiak-Gould <Benjamin.Rudiak-Gould at cl.cam.ac.uk> writes:

> And here's a slight variation in which force has the type a -> a,
> eliminating the need for the helper function eval. I'm not sure which
> version is better.

The version with () does less redundant forcing, although the compiler
could perhaps optimize them statically.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Haskell mailing list