JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.63k stars 5.48k forks source link

Feature request: Base.FixN? #50553

Closed MilesCranmer closed 2 months ago

MilesCranmer commented 1 year ago

Hello,

I was just wondering why Base.Fix$(N) only exists for N ∈ [1, 2]? It seems fairly arbitrary.

Could we perhaps add a Base.FixN which can take a ::Val{N::Integer} as an argument, and uses that to index the argument?

Best, Miles

Seelengrab commented 1 year ago

See also https://github.com/JuliaLang/julia/issues/554 for related discussion on currying.

nsajko commented 2 months ago

fixed by #54653