Literate Haskell & Currying

I stumbled across this literate Haskell program on Reddit earlier: Link.lhs

Literate Haskell is where the whole file is the codes comments and and you use a character (>) at the beginning of a line to mark that line as code. Kinda nifty especially in cases such as this.

The literate module linked to above explains some core Haskell concepts and compares them to how most languages work. I particularly enjoyed the section on Currying, which I’ve heard mentioned but not learnt about yet:

In that case, Haskell does what is called Currying, and
a function starved of arguments will return a function
that takes the remaining arguments. So,

	map 		--	Takes two arguments.
	map null 	--	Takes one argument.
	(map null) []	--	Takes no arguments -
				is the result of the 

That is how currying works.

Fantastic !

I’m keen to get learning Haskell properly rather than just reading around it. Must check some more things off my ToDo list first though …

My intention is to be working through the Haskell School of Expression before years end.