How can I get the indexes of elements in a Haskell list -


is there function in haskell returns indexs of elements elemindex in list. example list [1,2,3,4,2,3], looking 2 returns [1,4].

you can use hoogle type of questions. basically, type of function you're looking -- in our case have list [a] , a search , want return of [int] indices -- , search it (in case, first result, elemindices, seems work)


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -