News for hackers. Stuff that matters.
Re:Rust vs. Haskell by bryanlarsen on Tuesday February 14, 2023 @12:00PM (#34792270)
That's what I thought too, but I fixed some compiler errors by turning a closure into an inner function. Probably a PBKAC, but...
Re:Rust vs. Haskell by LegionMammal978 on Tuesday February 14, 2023 @06:07PM (#34797530)
Perhaps it's due to the fact that you can't really have type-generic closures in Rust: once the compiler has inferred one type, the closure cannot be used with another type. In contrast, inner functions can have any number of additional type parameters.