Add functions: head, flatten, index_of, and initial.