[Haskell-beginners] A very counterintuitive behaviour of Haskell

Brandon S Allbery KF8NH allbery.b at gmail.com
Thu Jan 27 18:09:27 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/27/11 09:55 , Renzo Orsini wrote:
> Prelude> let f 7 = "ok"
> Prelude> let f x = "no"

Doing it in separate let bindings doesn't combine; instead, the second one
hides the first.  let {f 7 = "ok"; f x = "no"} is more likely to do what you
expect.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1BpscACgkQIn7hlCsL25Xp2ACfYqe/fkuNY9YSnXM3ptFFGPvD
0k0An0hLeo4w7cv2ALc9MQJRhZIEOtyJ
=pYh3
-----END PGP SIGNATURE-----



More information about the Beginners mailing list