Copyright  (c) OleksandrZhabenko 20202021 

License  MIT 
Maintainer  olexandr543@yahoo.com 
Stability  Experimental 
Safe Haskell  None 
Language  Haskell2010 
Extensions 

Synopsis
 data TwoInThreeBang a b = B23 a !Int !Int
 data TwoInThreeBang2 a = B23L a ![Int] !Int
 data ThreeInFourBang a b = B34 b b !b ![a]
 findIdx1 :: (Eq a, Foldable t, Integral b) => a > t a > Maybe b
 findIdx1' :: (Eq a, Foldable t) => a > t a > Maybe Int
 findIdxs :: (Eq a, Foldable t) => a > t a > [Int]
 findIdxsL1 :: (Eq a, Foldable t) => a > t a > [Int]
 sliceToList :: (Eq a, Foldable t) => Int > Int > t a > [a]
 s2L :: Eq a => Int > Int > [a] > [a]
Documentation
data TwoInThreeBang a b Source #
Instances
Eq a => Eq (TwoInThreeBang a b) Source #  
Defined in Data.Foldable.Ix (==) :: TwoInThreeBang a b > TwoInThreeBang a b > Bool # (/=) :: TwoInThreeBang a b > TwoInThreeBang a b > Bool # 
data ThreeInFourBang a b Source #
B34 b b !b ![a] 
Instances
(Eq b, Eq a) => Eq (ThreeInFourBang a b) Source #  
Defined in Data.Foldable.Ix (==) :: ThreeInFourBang a b > ThreeInFourBang a b > Bool # (/=) :: ThreeInFourBang a b > ThreeInFourBang a b > Bool # 
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'
.
sliceToList :: (Eq a, Foldable t) => Int > Int > t a > [a] Source #
Inspired by the Data.Vector.slice function from the vector
package. Takes a 'slice' for the Foldable
structure converting it to the list. The first argument is the 'index' of the element in the structure starting from 0 from the left. The second one is the length of the slice.