Comment detail

重複する要素を取り除く (Nested Flatten)

Factor です。

1
2
3
4
5
6
7
8
USING: kernel sequences combinators.lib math ;

: uniq-only ( seq -- newseq )
    dup [ [ = ] curry ] swap [ slip swap count 1 = ] 2curry subset ;

! example
USE: prettyprint
{ 3 1 4 1 5 9 2 6 5 } uniq-only .

Index

Feed

Other

Link

Pathtraq

loading...