let rec get_rank g l = match l with 
  | []   -> 0
  | x::c -> if (x >= g) then (1 + (get_rank g c)) else (get_rank g c)