RosettaCodeData/Task/Stem-and-leaf-plot/OCaml/stem-and-leaf-plot-1.ml

10 lines
173 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let unique li =
let rec aux acc = function
| [] -> (List.rev acc)
| x::xs ->
if List.mem x acc
then aux acc xs
else aux (x::acc) xs
in
aux [] li