fork(6) download
  1. let rec removeDups xs =
  2. match xs with
  3. | h :: k :: t when h = k -> removeDups (h :: t)
  4. | h :: t -> h :: removeDups t
  5. | [] -> []
  6.  
  7. do
  8. printfn "%A" <| removeDups [1; 2; 2; 3]
Success #stdin #stdout 0.19s 26456KB
stdin
Standard input is empty
stdout
[1; 2; 3]