determine the index of element x within list l. 0 if x is at the headof the list, 1 if it comes directly after head, etc. nil if x is notin the list.