fold_int
fn fold_int(Vec<int> xs, int init, int -> int -> int folder) -> int Import
Source: use collections::vec::{fold_int}; src/collections/vec.hy The same as fold; kept for older code.
Parameters#
| Name | Type |
|---|---|
xs | Vec<int> |
init | int |
folder | int -> int -> int |
Returns#
int
See also#
collections::vec::foldcontains: Returnstruewhenneedleis inxs.index_of: Returns the index of the firstneedleinxs, or-1.binary_search: Findsneedlein the ascending vectorxsby halving, and returns an index holding it.dedup: Returnsxswith runs of equal neighbours collapsed to one value.map: Returns a new vector withmapperapplied to each element, in order.filter: Returns the elements for whichpredistrue, in order.first: Returns the first element, orNonewhenxsis empty.