Hi Henrik, Andreas,
> I guess this is the unforgiving punishment for calling (arg) without
> calling (next) previously, consider the reference:
> "If cnt is not given, the value that was returned from the last call
> to next" -> no previous call to next -> invalid usage -> punishment
Exactly! In fact, 'arg' should check such illegal usage. It is a
secondary function, and not much used.
The main workhorse for variable arguments is 'next', and often
all that is needed:
: (de f @
(while (next)
(println @) ) )
-> f
: (f 1 2 3)
1
2
3
The purpose of 'arg' is to avoid the overhead of a local variable if
the value is used more than once.
♪♫ Alex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe