extract maybeHead/maybeTail functions