Iter
No module comment.
How many elements p holds for. It takes a predicate: how many elements
there are is len, which a container answers without walking itself.
The first element p holds for.
Returns the result of calling step on the accumulator and each element in
turn, starting from initial. It takes its arguments in the order of
Array.fold and Vec.fold, and works on anything iterable.
Returns the elements added together from zero(), which is the result for
no elements.
Returns the elements multiplied together from one(), which is the result
for no elements.
Returns the least element, or None for no elements. Of several elements
that are equal under <, it returns the first. A NaN is neither less than
nor greater than anything, so a Float result depends on where a NaN sits:
[nan, 1.0] gives NaN and [1.0, nan, 0.5] gives 0.5.
Returns the greatest element, or None for no elements. Of several elements
that are equal under <, it returns the first. A NaN is neither less than
nor greater than anything, so a Float result depends on where a NaN sits.
Returns the element whose key is least, or None for no elements. It
calls key once per element, and the first element wins a tie.
Returns the element whose key is greatest, or None for no elements. It
calls key once per element, and the first element wins a tie.
Returns the elements of xs in order, as a fresh array.
Returns xs with each element paired with its position, counting from 0.
Returns the pairs of elements of xs and ys at the same position. Stops
at the shorter input; each pull takes one from xs first, so an element of
xs with no partner is consumed and dropped.
Returns f of each element of xs, computed as each is pulled.
Array.map is the eager form, which builds an array.
Returns the elements of xs that keep holds for. Array.filter is the
eager form, which builds an array.
Returns the elements of xs up to the first one keep does not hold for.
That first one is consumed and dropped.
Returns the elements of xs from the first one skip does not hold for.
Returns the first n elements of xs, or all of them if there are fewer.
Pulls at most n from xs, and none when n is 0. Panics if n is
negative.
Returns the elements of xs after the first n. Panics if n is
negative.
Returns each element of xs paired with the one after it: (x0, x1),
(x1, x2), and so on. Empty if xs has fewer than two elements.
Returns every run of n consecutive elements of xs, each as a fresh
array: [x0, x1, x2], [x1, x2, x3], and so on. Empty if xs has fewer
than n. Allocates one array of n per window. Panics if n is less
than 1.
Returns the elements of xs in consecutive groups of n, each as a fresh
array; the last group is shorter if the elements run out. Allocates one
array per group, and one buffer per walk that grows to the largest group.
Panics if n is less than 1.
Returns n, n + 1, n + 2, and so on without end. A loop over it ends
only by break or return, or by an adapter such as takeWhile.
Returns the elements of xs over and over without end, starting xs
again each time it runs out. Empty if xs is empty.
Returns the elements of xs and then those of ys.
Returns every choice of k elements of xs, in the order they appear in
xs, without repetition: for [1, 2, 3] and 2, [1, 2], [1, 3],
[2, 3]. One empty choice if k is 0, none if k exceeds len(xs).
Allocates one array of k per choice. Panics if k is negative.
Returns every ordering of k distinct elements of xs (distinct by
position): for [1, 2, 3] and 2, [1, 2], [1, 3], [2, 1], [2, 3],
[3, 1], [3, 2]. One empty ordering if k is 0, none if k exceeds
len(xs). Allocates one array of k per ordering. Panics if k is
negative.
Returns every pair of an element of xs and an element of ys, xs
varying slowest: for [1, 2] and ["a", "b"], (1, "a"), (1, "b"),
(2, "a"), (2, "b"). Iterates ys again from the start for each
element of xs. Empty if ys is, even when xs is endless.
Returns every array of n elements drawn from xs, repeats allowed, the
last position varying fastest. For
[0, 1] and 2, [0, 0], [0, 1], [1, 0], [1, 1]. One empty array if
n is 0. Allocates one array of n per element. Panics if n is
negative.