Re:How high school students start thinking about code
by llimllib on Monday July 06, 2009 @04:08PM
(#690354)
I know that's what it does under the covers, but is there any reason not to think of it as assignment in your head? That's the mental construct I use in my extremely limited Haskell coding, anyway.
[ Parent
| on HN ]
Re:How high school students start thinking about code
by lanaer on Tuesday July 07, 2009 @10:41AM
(#691536)
Because if you think of it as assignment, the fact that
a <- [2]
binds a to 2, rather than [2], makes no sense.
edit:
a better example (because it is more useful) would be:
a <- Just 2
which, again, binds a to 2, unwrapping the Maybe monad in the process. (I forget what happens if you try to do a <- Nothing)