[Haskell-cafe] Pointless functors

Brent Yorgey byorgey at seas.upenn.edu
Fri Mar 13 11:12:18 EDT 2009


On Fri, Mar 13, 2009 at 05:35:31PM +0300, Eugene Kirpichov wrote:
> 'An arbitrary element' means 'undefined will suffice'
> 
> point x = fmap (const x) undefined

This is false.

  Prelude> fmap (const 1) [()]
  [1]
  Prelude> fmap (const 1) undefined
  *** Exception: Prelude.undefined

-Brent



More information about the Haskell-Cafe mailing list