Documentation

Init.Data.Function

@[inline]
def Function.curry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} :
(α × βφ)αβφ

Transforms a function from pairs into an equivalent two-parameter function.

Examples:

Equations
Instances For
    @[inline]
    def Function.uncurry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} :
    (αβφ)α × βφ

    Transforms a two-parameter function into an equivalent function from pairs.

    Examples:

    Equations
    Instances For
      @[simp]
      theorem Function.curry_uncurry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} (f : αβφ) :
      @[simp]
      theorem Function.uncurry_curry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} (f : α × βφ) :
      @[simp]
      theorem Function.uncurry_apply_pair {α : Type u_1} {β : Type u_2} {γ : Sort u_3} (f : αβγ) (x : α) (y : β) :
      uncurry f (x, y) = f x y
      @[simp]
      theorem Function.curry_apply {α : Type u_1} {β : Type u_2} {γ : Sort u_3} (f : α × βγ) (x : α) (y : β) :
      curry f x y = f (x, y)