Are there ruby equivalents to the lisp car, cdr, and cons functions? For those unfamiliar with lisp, here\'s what I want from ruby:
[1,2,3].car => 1 [1,2,3]
I'd recommend reading the Ruby API for Array. There are many methods and operators there that can do exactly what you need.
Array
http://www.ruby-doc.org/core/classes/Array.html