POSITION-EQ

position of an item in a string or a list, using eq as test
Major Section:  PROGRAMMING

(Position-eq item seq) is the least index (zero-based) of the element item in the list seq, if in fact item is an element of seq. Otherwise (position-eq item seq) is nil.

(Position-eq item lst) is provably the same in the ACL2 logic as (position item lst) and (position-equal item lst) when lst is a true list, but it has a stronger guard because it uses eq for a more efficient test for whether item is equal to a given member of lst. Its guard requires that lst is a true list, and moreover, either item is a symbol or lst is a list of symbols. See position-equal and see position, which unlike position-eq have guards that allow the second argument to be a string.