DEV Community

Discussion on: My first impressions of Rust

Collapse
 
eugenebabichenko profile image
Yevhenii Babichenko

What do you mean by "interchangeable"? If a function accepts a parameter of type impl Fn(...) -> ..., then this parameter can be either a function or a closure (so they are interchangeable). You can do many other other things with such types (return them, assign to variables, etc). IMO this is something that looks like 1st class functions.

Thread Thread
 
deepu105 profile image
Deepu K Sasidharan

See my comment above