church.hs 201 B

12345678
  1. type Church t = (t -> t) -> t -> t
  2. int2church :: Integer -> Church t
  3. int2church 0 s z = z
  4. int2church n s z = int2church (n - 1) s (s z)
  5. church2int :: Church Integer -> Integer
  6. church2int n = n (+1) 0