Talk:How to read Haskell

From HaskellWiki
Revision as of 04:17, 20 August 2006 by EricKow (talk | contribs) (from the content page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Help us help you!

Does Haskell hurt your brain? Post here any questions or observations you have about reading Haskell. What are the things that make Haskell painful for you to read? Is it just the density of things? Comments welcome -- EricKow 16:22, 13 August 2006 (UTC)


What confuses non-Haskellers

Since this tutorial is not yet written, we encourage you to note here the things which confuse non-Haskellers about the code code.

  • layout instead of semicolons?
  • super-super-concise stuff (things using liftM and liftM2)
  • the difference between
    x <- foo
    
    and
    x = foo
    

Scratch pad

You have thirty seconds. Can you understand what .+ does?

(-1) .+ _ = -1
_ .+ (-1) = -1
a .+ b = a + b
I was initially going to use this example for saying that you should get used to pattern matching... but now I'm not so sure. It shows you two things really, (1) the pattern matching stuff, and (2) the fact that we like to define our operators in this infixy way.