[Haskell-beginners] beginner's type error

Michael Mossey mpm at alumni.caltech.edu
Fri Mar 27 09:01:15 EDT 2009

Peter Verswyvelen wrote:
> You can also get rid of the parentheses like this:
> thing n = n + fromIntegral $ round $ sqrt n

I'm having a hard time finding an explanation of the dollar signs. What 
do they do? It looks like they break up the left-ro-right association of 
function names to arguments.

As a beginner, I love how Haskell is filled with so many good ideas, in 
many areas. The basic concept of functional programming is good, but 
also Haskell has beautiful syntax that's just pleasing to look at, and 
also has many convenient features which may not quite qualify as 
"beautiful" or "elegant" but are just convenient (still a worthy thing).

Languages that borrow from Haskell, like Python's list comprehensions, 
invariably are much dumbed-down implementations. In Python, list 
comprehensions don't have guards or pattern matching. (Technically you 
can put in a guard via an if statement, but you are doing a lot more 
typing at that point.)


More information about the Beginners mailing list