Lately I've been trying to learn more about functional programming and
understand more about ruby's functional features in the process. In studying
SML, I've come across a function called reduce, which seems very similar to
ruby's inject method. I've defined reduce in ruby as follows:

def reduce(f, b, list)
  if (list.empty?)
    b
  else
    f.call(list.first, reduce(f, b, list[1, list.length]))
  end
end

Am I correct in assuming the only difference between reduce and the inject
method described in the pickaxe book is that reduce takes an anonymous
method as an argument rather than inserting a block via yield? Also, when
using ruby in a functional style is there a better way to get the
traditional car and cdr of an Array than array.first, array[1, array.length]?
I understand that an array is not the same thing as a "list", but I'm just
thinking convience here.

-- 
Travis Whitton <whitton / atlantic.net>