let rec head ?(n:int=1) (l:'a list) : ('a list) = 
  if n<=0 then [] else let n = (n-1) in 
  match l with 
  | []   -> []
  | x::r -> x::(head ~n r)