[REBOL] Re: [Function] with [Variable number of args]
From: maximo:meteorstudios at: 5-Apr-2004 18:55
> Can someone tell me if there is one simple way to do this
> with REBOL or if I have to define another independant
> function to do this.
AFAIK rebol does not handle variable number of arguments, simply because it cannot know
where a specific word should stop using values.
rebol can only use a variable number of arguments if you use a refinement, to let it
know that additional values are needed. each refinement specifiying how many additional
tokens it will use up.
if you implement your own dialect, then IT can decide if any given word should continue
using the following values based on their type, for example.
a simple dialect, could be built that simply uses one block and parses it, but still,
you are supplying always One argument to the block parser itself.
note that you can use a paren! like a block too... this can make it look more like a
++ (1 3)
++ (1 3 5 7)