Script Library: 1209 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script duplicates.r

1
piotrgapinsk
8-Mar-2016 0:17
Hello.

There's more than one way to do it :)


dup!: func [input [series!]] [foreach i unique input [alter input 
i] return input]

>> dup! [1 1 2 3 4 4 4 5 6 7 7 8 9 9 9 9 10]
== [1 4 4 7 9 9 9]
>> unique dup! [1 1 2 3 4 4 4 5 6 7 7 8 9 9 9 9 10]
== [1 4 7 9]
>> dup! "00011233444"
== "001344"
2
clecorre
8-Mar-2016 9:05
Nice !