Breaking change: Flipped Compose and BackCompose
The Func
extension methods Compose
and BackCompose
have been flipped. I felt they were the wrong way around, and that in this situation where the Prelude
function compose
works one way:
static Func<int, float> f = x => x * 3.0f;
static Func<float, bool> g = x => x > 4.0f;
var h = compose(f, g);
That the extension method should also go the same way:
var h = f.Compose(g);
It would also feel more natural when composing multiple functions:
var x = a.Compose(b).Compose(c).Compose(d);
So if you use the Compose
and BackCompose
extensions, then you need to flip them in your code.