Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Re(2): newbie!?

From: al:bri:xtra at: 1-Dec-2000 19:46

daPenguin wrote:
> but I want to do the opposite, a function that returns > vallues repeated a predetermined number of times, > choosing 3x in this case ... vallue "1" would be returned > is it possible??? > > function expl > [1 1 1]
Here's a starter for you:
>> expl: [1 2 1 3 1 2]
== [1 2 1 3 1 2]
>> Duplicates: func [Series [series!]][
[ foreach Item unique Series [ [ remove find Series Item [ ] [ Series [ ]
>> duplicates expl
== [1 1 2] Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/