|
|
|
|
|
by FridgeSeal
1119 days ago
|
|
> let add_closure = |a, b| a + b;
let sixty_six = add_closure(42, 24); Woah woah, how did it not occur to me that I could just…construct a closure that directly in Rust? This feels like one of those “incredibly obvious and reasonable in hindsight” things. I don’t know why I was labouring under the assumption they could only be invoked in very special and specific places, but it’s good to know I was wrong. |
|