[Haskell-cafe] Equality Question

Thomas Hartman thomas.hartman at db.com
Tue Oct 16 09:46:37 EDT 2007


not quite the same issue, but you might be interested by 

http://people.cs.uu.nl/stefan/blog/00012.html which notes: 

Prelude> let apply  = \f x -> f x

Prelude> let apply' = \f   -> f

Prelude> apply  undefined `seq` ()
()

Prelude> apply' undefined `seq` ()
*** Exception: Prelude.undefined

mulling this over helped me think about functions that were similar but 
had different numbers of params. (the first only takes a function as its 
first arg, the second, which I believe is the same as "id" takes 
anything.)

t.





PR Stanley <prstanley at ntlworld.com> 
Sent by: haskell-cafe-bounces at haskell.org
10/15/2007 06:56 PM

To
haskell-cafe at haskell.org
cc

Subject
[Haskell-cafe] Equality Question






Hi
is const = id?
const 'x' 'y'
'x'
id 'x'
'x'

Cheers,
Paul

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071016/e2f889b0/attachment.htm


More information about the Haskell-Cafe mailing list