elemIndices -package:base
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.
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.
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.
Outputs the indices of all elements that match the given element
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) 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.
Stream all indices whose elements match the given
Word8
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)