Function std::vec::from_fn

pub fn from_fn<T>(n_elts: uint, op: &fn(uint) -> T) -> ~[T]

Creates and initializes an owned vector.

Creates an owned vector of size n_elts and initializes the elements to the value returned by the function op.