Daily Archives: January 31, 2010

First and Rest in Ruby

A common pattern when doing functional-style programming is to split a list into first and rest components, otherwise known as head and tail (or car and cdr in Lisp). first is the first item in the list, or nil if … Continue reading

Posted in Uncategorized | Tagged , | 4 Comments