3 ms·
Because Rust doesn't have higher-kinded types. Well it does but it doesn't allow you to define or implement traits for them. Also, what happens when you compos
by kccqzy 7y ago
Because Rust doesn't have higher-kinded types. Well it does but it doesn't allow you to define or implement traits for them.
Also, what happens when you compose one function with FnMut and another with just Fn? The answer is clearly FnMut. These three traits are related by a subtyping relationship. I don't know enough Rust to answer the question of whether such a hypothetical compose function can return the right one from this hierarchy.