Rust: how to return a closure from a function, and what are closures anyway?

Sometimes we want to return a closure from a function, and sometimes that doesn&#x27;t work the way we might expect. This will lead us on to how we should think of closures: they&#x27;re not really like functions so much as automatically-generated structs with types we are not allowed to name. And all closures have different types, even if they&#x27;re identical...? Follow me on mastodon:…