mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 17:46:40 +03:00
12 lines
232 B
Plaintext
12 lines
232 B
Plaintext
List.app
|
|
: ∀(A: *)
|
|
∀(B: *)
|
|
∀(f: ∀(x: A) B)
|
|
∀(x: (List A))
|
|
(List B)
|
|
= λA λB λf λx
|
|
let P = λx(List B)
|
|
let cons = λh λt (List.cons B (f h) (List.app A B f t))
|
|
let nil = (List.nil B)
|
|
(~x P cons nil)
|