(****************************************************************)
(* map *)

Fixpoint map (l : list A) : (A -> B) -> list B :=
  
 (************************)
 fun f : A -> B =>
 match l return (list B) with
 | nil => nil
 | b :: l' => f b :: map l' f
 end.

Lemma length_map : forall (l : list A) (f : A -> B), length (map l f) = length l.