In this case I simply use (arg 1), I just wanted to check if perhaps (arg) defaulted to (arg 1) if no prior next had been called.
On Sat, Nov 12, 2016 at 7:45 AM, Alexander Burger <[email protected]> wrote: > 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 -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
