once

public func once[T](T) -> OnceIterator[T]

Returns a OnceIterator that yields value and then nothing. Equivalent to [value].iter() without the array allocation.

Defined in lang/std/iter/adapters.ks