Newbie question: Howto remove only first element from a list
Subject: Newbie question: Howto remove only first element from a list
From: Robert Dodier
Date: Fri, 25 Apr 2008 09:05:13 -0600
On 4/25/08, Raymond Toy (RT/EUS) <raymond.toy at ericsson.com> wrote:
> Yes, I figure that from reading the documentation. But look at what it
> says:
>
> (%i3) ? rest
>
> -- Function: rest (<expr>)
> Returns <expr> with its first <n> elements removed if <n> is
It looks like the index is messed up --- the text should include
the previous line which says rest(expr, n).
What do you get if you enter
? save
Do you get several varieties of save(foo) or just one?
> I think it would be better to say something like
>
> -- Function: rest (<expr>[, <n>])
>
> to make it clear that there's an optional argument allowed.
This is a tangential issue, but: there is ambiguity here because some
functions require a literal list in the arguments (but not "rest").
Better to spell out the various incantations rather than require
the user to infer the valid argument styles.
FWIW
Robert Dodier