English
Curry takes a function on a tuple and produces a curried function; there is a reciprocal operation uncurry turning a curried function into a function on a tuple.
Русский
Кюрри превращает функцию на кортеж в карусированную, существует обратная операция uncurry, переводящая каррированную функцию обратно в функцию на кортеж.
LaTeX
$$$\\text{curry} : (((i : Fin n) \\to p i) \\to \\tau) \\to \\mathrm{FromTypes}\; p\\tau$ and its inverse uncurry, giving the Curry–uncurry correspondence$$
Lean4
/-- Curry all the arguments of `Function.FromTypes p τ` to get a function from a tuple. -/
def curry : {n : ℕ} → {p : Fin n → Type u} → {τ : Type u} → (((i : Fin n) → p i) → τ) → Function.FromTypes p τ
| 0, _, _, f => f isEmptyElim
| _ + 1, _, _, f => fun a => curry (fun args => f (Fin.cons a args))