use std::iter; /// Create an empty vector pub fn create_empty() -> Vec { Vec::new() } /// Create a buffer of `count` zeroes. /// /// Applications often use buffers when serializing data to send over the /// network. pub fn create_buffer(count: usize) -> Vec { iter::repeat(0).take(count).collect() } /// Create a vector containing the first five elements of the Fibonacci sequence. /// /// Fibonacci's sequence is the list of numbers where the next number is a sum of the previous two. /// Its first five elements are `1, 1, 2, 3, 5`. pub fn fibonacci() -> Vec { vec![1, 1, 2, 3, 5] }