RosettaCodeData/Task/Remove-duplicate-elements/Forth/remove-duplicate-elements-3.fth
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

5 lines
167 B
Forth

create test 1 , 2 , 3 , 2 , 6 , 4 , 5 , 3 , 6 ,
here test - cell / constant ntest
: .test ( n -- ) 0 ?do test i cells + ? loop ;
test ntest 2dup cell-sort uniq .test