:: a -> [a] -> Int package:Agda

A generalised variant of elemIndex. O(n).
Find position of a value in a list. Used to change metavar argument indices during assignment. reverse is necessary because we are directly abstracting over the list.