Project

General

Profile

Revision bb2ca5f4 src/utils.ml

View differences:

src/utils.ml
53 53
  | None   -> None
54 54
  | Some e -> Some (f e)
55 55

  
56
let rec remove_duplicates l =
57
 match l with
58
 | [] -> []
59
 | t::q -> if List.mem t q then remove_duplicates q else t :: remove_duplicates q
60

  
56 61
let position pred l =
57 62
  let rec pos p l =
58 63
    match l with

Also available in: Unified diff