Functional Programming & Proofs


Exercises

Prove the following properties:

  1. length (l1 @ l2) = (length l1) + (length l2)
  2. length (map f l) = length l
  3. map f (l1 @ l2) = (map f l1) @ (map f l2)
  4. map (f1 >> f2) l = map f1 (map f2 l)
  5. filter p1 (filter p2 l) = filter p2 (filter p1 l)

answers