Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/std/iter/collect/index.nct

index.nct

//! Allocation-backed iterator terminal operations.
//!
//! This module depends on both the allocation-free iterator contract and the
//! destination collection. Keeping that dependency here preserves an acyclic
//! graph between `std/iter` and collection modules.

use /iter.Iterator
use /vec.Vec
see ./collection.nct

/// Consumes `source` into a newly allocated Vec.
pub func to_vec<I>(source: I): Vec<I.Item> from source where I impl Iterator