Function show_notes::e004::apply_function_to_i64

source ยท
pub fn apply_function_to_i64<F>(a_number_function: F, the_number: i64) -> i64
where F: Fn(i64) -> i64,
Expand description

Shows how to take a function as an argument.

Note that this involves specifying a generic (the <F> syntax), bounded by a trait (the where... syntax), a concept to which we will return in much more detail in a few episodes.