Comment detail
重複する要素を取り除く (Nested Flatten)
Arcです。
[]記法が使えるのを忘れてました。短いのは良いとは思えど…。
[]記法が使えるのを忘れてました。短いのは良いとは思えど…。
1 2 | (def uniq-only (lst)
(rem [mem _ (cdr:mem _ lst)] lst))
|
1 2 | (def uniq-only (lst)
(rem [mem _ (cdr:mem _ lst)] lst))
|
mc
#5595()
[
Arc
]
Rating0/0=0.00
(uniq-only '(3 1 4 1 5 9 2 6 5))
;=> (3 4 9 2 6)
(def uniq-only (lst) (rem (fn (item) (mem item (cdr:mem item lst))) lst))Rating0/0=0.00-0+
1 reply [ reply ]