RosettaCodeData/Task/Remove-duplicate-elements/Forth/remove-duplicate-elements-3.fth

6 lines
167 B
Forth
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
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