All pastes #356289 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-15 00:17 UTC
rendered paste body
factorial :: Int -> Int
factorial n = iter n 1
  where
    iter 0 r = r
    iter n r = iter (n-1) (n*r)



What is the name of 'iter n 1'
What is the name of everything after the where clause.
How does the pattern matching take place. It seems reversed because iter n 1, 1 is a literal , not a value to match.