[src]

Function std::slice::from_fn

pub fn from_fn<T>(n_elts: uint, op: |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.