Function show_notes::e005::doubler_closure_factory
source ยท pub fn doubler_closure_factory() -> Box<dyn Fn(i32) -> i32>
Expand description
Creates a closure which doubles an integer.
Compare with the function above: this is basically identical to
doubler_factory
, the only difference being that in this case, we return a
closure rather than a standalone function. That has substantial
ramifications for using closures and named functions, of course; refer to
the discussion in e004 for details