Add tags

Add tags to the following comment
# uniq [3; 1; 4; 1; 5; 9; 2; 6; 5; 3; 5; 8; 9; 7; 9];;
- : int list = [3; 1; 4; 5; 9; 2; 6; 8; 7]
1
2
3
4
5
6
7
let uniq xs =
  let rec uniq' acc = function
  | [] -> acc
  | y::ys when (List.mem y acc) -> uniq' acc ys
  | y::ys -> uniq' (y::acc) ys
  in
  List.rev (uniq' [] xs)

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...