Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions | Cpp |
Data.Foldable.Ix
Description
Documentation
findIdxs :: (Eq a, Foldable t) => a -> t a -> [Int] Source #
Function to find out the 'indices' of the elements in the Foldable
structure (from the left with indices starting from 0) that equal to the first argument. Returns empty list if there are no such elements. Uses two passes
through the structure.
findIdxsL1 :: (Eq a, Foldable t) => a -> t a -> [Int] Source #
Function to find out the 'indices' of the elements in the Foldable
structure (from the left with indices starting from 0) that equal to the first argument. Returns empty list if there are no such elements. Uses just one
pass through the structure and additional reverse
operation on the resulting list with foldl'
.