Function rufl::collection::shuffle

source ·
pub fn shuffle<T: Copy>(collection: &Vec<T>) -> Vec<T>
Expand description

Returns a vector of shuffled values

§Arguments

  • collection - The vector to shuffle.

§Returns

Returns the new shuffled vector.

§Examples

use rufl::collection;

assert_eq!(5, collection::shuffle(&vec![1, 2, 3, 4, 5]).len());