Talk:Haskell/Higher-order functions and Currying

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

In the first listing,

where less = filter (< x) xs

and below - don't work in my GHCi. Have to write it like this:

	where
	less = filter (< x) xs

etc.

Are you sure? I copied-and-pasted it into h.hs, and did a :load "/home/gwern/h.hs" within GHCi and sure enough:
*Main> quickSort [1,5,8,15,1,3,4]
[1,1,3,4,5,8,15]
----Gwern (contribs) 20:08, 8 February 2007 (UTC)

I was wrong: the trouble was caused by an editor with non-monospace font, so while it seemed that code is well indented, it was, in fact, not. Sorry.

[edit] almost completed?

calling Eric: now that this section has the currying section filled up, can you just give it a revision and remove that irriatating 50% completed symbol? — 58.106.132.214, 2008-02-26T10:14:26

I'll at least remove the stub tag. —Toby Bartels (talk) 21:56, 18 November 2008 (UTC)