[src]

Function std::slice::build

pub fn build<A>(size: Option<uint>, builder: |push: |v: A||) -> ~[A]

Builds a vector by calling a provided function with an argument function that pushes an element to the back of a vector. The initial capacity for the vector may optionally be specified.

Arguments