Hi,

On 11.06.2004, at 18:23, Charles Comstock wrote:
> I don't want a destructive function.  A number of times I have used 
> the shift
> and the remainder, but there are a number of times you want a non 
> destructive
> copy of the rest of the list.  Hence rest ;p

If you don't want to destroy the original list you can use the splat 
operator
in an assignment:

a = [ 1, 2, 3, 4 ]
# => [1, 2, 3, 4]
first, *rest = a
# => [1, 2, 3, 4]
first
# => 1
rest
# => [2, 3, 4]

Florian Frank