Kind/book/List.app.kind2
2024-03-01 20:40:31 -03:00

8 lines
222 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)