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
- size - An option, maybe containing initial size of the vector to reserve
- builder - A function that will construct the vector. It receives as an argument a function that will push an element onto the vector being constructed.