Remove use of partial function 'head'

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>