dhall-nix-lib/Function/flip.dhall

16 lines
387 B
Text
Raw Normal View History

2022-09-08 18:49:47 +00:00
let flip
: ∀(A : Type) → ∀(B : Type) → ∀(C : Type) → (B → A → C) → A → B → C
= λ(A : Type) →
λ(B : Type) →
λ(C : Type) →
λ(f : B → A → C) →
λ(a : A) →
λ(b : B) →
f b a
let example1 =
assert
: flip Text Text Text (λ(a : Text) → λ(b : Text) → a ++ b) "a" "b" ≡ "ba"
in flip