This comment is reply for 481 ether: #456 は「配列状」を緩く解釈してリス...(アレイのuniq). Go to thread root.
iwk #579(2007/07/11 14:07 GMT) [ OCaml ] Rating-1/1=-1.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
open System;; open Array;; let uniq xs = let ars = create (length xs) xs.(0) in let i = ref 1 in for idx = 1 to (length xs)-1 do if not (exists (fun elem -> xs.(idx) = elem) ars) then begin ars.(!i) <- xs.(idx); i := !i+1 end else () done; sub ars 0 !i;;
Rating-1/1=-1.00-0+
[ reply ]
iwk
#579()
[
OCaml
]
Rating-1/1=-1.00
Rating-1/1=-1.00-0+