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

Prolog - Listing -

python - More Issues with overlapping labels in Tkinter -

linear regression - Trying to get confidence/prediction intervals with `predict.lm` in R, but I keep getting an error regarding my dichotomous variable -