I think this should be `&mut |u32, bool| -> f64`?