rewrite ``locateat`` function according to @timholy and using comprehension

rename to indexin