Return the first or last part of a list (from https://gist.github.com/pimentel/256fc8c9b5191da63819)
headList.Rd
Returns the first or last part of a list. Instead of returning the first n entries as the standard head() does, it attempts to call head() recursively on the entries in the list. If it fails, it will return the particular entry (standard behavior).