I've been trying to do currying as in functional programming languages in Rust but I can't get it to work. By currying i mean taking only one argument each function and returning an anonymous function. But my problem is that I don't know how to use a values outside of the anonymous function inside it. For example if i wanted to do that, how could I do it?
fun sum (a : f32) -> λ(f32) -> f32 {
λ(b : f32){
return a + b;
}
}