elemIndices -package:unboxing-vector -package:pipes-bytestring -package:bytestring -package:pipes
The
elemIndices function extends
elemIndex, by returning
the indices of all elements equal to the query element, in ascending
order.
>>> elemIndices 'o' "Hello World"
[4,7]
O(n) The
elemIndices function extends
elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order.
O(n) The
elemIndices function extends
elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order.
O(n) Yield the indices of all occurrences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurrences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurrences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurrences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurrences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) The
elemIndices function extends
elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order. This implementation uses memchr(3).
O(n) The
elemIndices function extends
elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order. This implementation uses memchr(3).
O(n) Yield the indices of all occurences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurences of the given element
in ascending order. This is a specialised version of
findIndices.
O(n) Yield the indices of all occurences of the given element
in ascending order. This is a specialised version of
findIndices.
Returns the indices of the matching elements. See also
findIndices
Find all the indices where the value of the element in the stream is
equal to the given value.
elemIndices a = findIndices (== a)
O(n) The
elemIndices function extends
elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order.
The
elemIndices function extends
elemIndex, by returning
the indices of all elements equal to the query element, in ascending
order.
Beware:
elemIndices x xs will diverge
if any suffix of
xs does not contain
x.
Returns the index of the latest element if the element matches the
given value.
Definition:
>>> elemIndices a = Fold.findIndices (== a)
Find all the indices where the value of the element in the stream is
equal to the given value.
>>> elemIndices a = Stream.findIndices (== a)
O(n) Yield the indices of all occurences of the given element
in ascending order. This is a specialised version of
findIndices.
>>> elemIndices 1 $ unsafeFromList [1,2,3,1]
[0,3]
>>> elemIndices 0 $ unsafeFromList [1..3]
[]
Return indices of all elements, equal to a given.
This function isn't productive (e. g.,
head .
elemIndices f won't terminate), if no elements of the
input list are equal the given one.
Returns all indices of the given element in the list.
Since 0.7.0.0