"Alexander Kellett" <ruby-lists / lypanov.net> wrote in message news:20040611112816.GA2067 / loki...
| first / rest is symmetric...
| head / tail unix commands don't default to 1 "line"
| car + cdr have crappy names.
| i'm sure there is something better for this :)

Could be take / drop (with optional argument, number of items):

[1,2,3,4].take       --> 1
[1,2,3,4].take(1)    --> 1  # or can be [1]
[1,2,3,4].take(2)    --> [1,2]
[1,2,3,4].drop       --> [2,3,4]
[1,2,3,4].drop(2)    --> [3,4]
[1,2,3,4].take(-3)   --> [2,3,4]
[1,2,3,4].drop(-1)   --> [1,2,3]

And in some language there was a pair 'first / butfirst'.

-- 
Georgy Pruss
E#Mail: 'naabbcaDaddaLryDwksvKmyw'.tr('a-zA-Z','0-9a-z.@')