head, tail, and recursive foldl

implemented over arrays, not cons'ed pairs