Re: [Haskell-cafe] Questions about the Functor class and it's use in "Data types à la carte"

David Menendez dave at zednenem.com
Sat Dec 15 00:20:24 EST 2007


On Dec 14, 2007 9:44 PM, Benja Fallenstein <benja.fallenstein at gmail.com>
wrote:

> data Val a = Val Int
>
> instance Functor Val where
>    fmap f (Val x) = f `seq` Val x
>

Ah, good old seq. How I loathe it.

Seriously, though, good catch. I always forget about seq when I'm doing
stuff like this.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071215/79a1fe65/attachment.htm


More information about the Haskell-Cafe mailing list