This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(test)] | |
mod tests { | |
use std::rc::Rc; | |
// the `type` is not needed but it makes it easier if you will | |
// be using it in other function declarations. | |
type Adder = Fn(i32) -> i32; | |
fn sum(x: Rc<i32>) -> Rc<Adder> { |