proc items*[T](s: Iterator[T]): Iterator[T]
-
Source
Edit
proc next*[T](i: Iterator[T]): Option[T]
-
Advances the iterator and return next item or none[T] if there are no more items.
Source
Edit
proc unzip*[A, B](i: Iterator[tuple[a: A, b: B]]): tuple[a: seq[A], b: seq[B]]
-
Returns (i[0].a, i[1].a, ...), (i[0].b, i[1].b, ...)
Source
Edit
proc dropWhile*[T](i: Iterable[T]; f: proc (t: T): bool): T {.multifuncIterator
.}
-
Skips longest sequence of elements of this iterator for which f returns true.
Source
Edit
proc takeWhile*[T](i: Iterable[T]; f: proc (t: T): bool): T {.multifuncIterator
.}
-
Returns longest sequence of elements for which f returns true.
Source
Edit
proc filter*[T](i: Iterable[T]; f: proc (t: T): bool): T {.multifuncIterator
.}
-
Returns items for which f returns true.
Source
Edit
proc reversed*[T](s: seq[T]): seq[T]
-
Source
Edit
proc all*(i: Iterable[bool]): bool
-
Returns true iff all items in i are true.
Source
Edit
proc someTrue*(i: Iterable[bool]): bool
-
Returns true iff some item in i is true.
Source
Edit
proc sorted*[T](i: Iterable[T]): seq[T]
-
Source
Edit
proc findOne*[T](i: Iterable[T]; function: (proc (t: T): bool)): Option[T]
-
Source
Edit
proc argmax*[T](s: seq[T]): int
-
Source
Edit