|
|
|
|
|
by kibwen
3892 days ago
|
|
Note that anytime you see a closure in any language that just takes a single argument, calls a single function with that argument, and returns the value of that function, then you can eliminate the closure entirely by just passing the function instead. So `filter_map(|x| foo(x))` can be written more simply as just `filter_map(foo)`. |
|