[Haskell-cafe] explaining currying w/o math

Donn Cave donn at drizzle.com
Sat May 7 23:44:49 EDT 2005


Quoth Daniel Carrera <dcarrera at digitaldistribution.com>:
...
| In your opinion, do you think Haskell is appropriate for someone with 
| zero math background? I can't imagine how I'd explain something like 
| currying to someone who doesn't know math.

Then she may have to learn it from someone else, but there are
resources out there.  The first thing that came up for me in a
web search:

    http://www.willamette.edu/~fruehr/haskell/lectures/tutorial4.html

	Haskell functions of several arguments are actually "curried",
	i.e., they are higher-order functions of successive arguments 

	> :t take 
	take :: Int -> [a] -> [a] 

	> :t take 10 
	take 10 :: [a] -> [a] 

	> :t take 10 ['a'..'z'] 
	take 10 (enumFromTo 'a' 'z') :: [Char]

I think the key is examples.

	Donn Cave, donn at drizzle.com


More information about the Haskell-Cafe mailing list