Implement a function that applies `f` twice.
2 lines · Lean 4
Objectifs
- Implement a function that applies `f` twice.
Indices
Voir la solution
def twice {α : Type} (f : α → α) (x : α) : α :=
f (f x)Implement a function that applies `f` twice.
def twice {α : Type} (f : α → α) (x : α) : α :=
f (f x)