Fix1 (analogue of Base.Fix2)

On the other hand, https://github.com/JuliaLang/julia/pull/24990 would turn Fix2(f, x) into f(_, x) and the hypothetical Fix1(f, x) into f(x, _) which I personally like quite a lot.

I guess another question would be whether you want the result of Fix1(f, x) to be y -> f(x, y) as above or the more general (args...) -> f(x, args...) ? Fix2 seems more clear in its purpose, since it assumes that f has exactly two arguments, but it feels odd for Fix1 to make the same assumption.

1 Like