Kind/book/List.concat.kind2
2024-02-10 12:25:48 -03:00

11 lines
254 B
Plaintext

List.concat
: ∀(T: *)
∀(xs: (List T))
∀(ys: (List T))
(List T)
= λT λxs λys
let P = λxs ∀(ys: (List T)) (List T)
let cons = λhead λtail λys (List.cons T head (List.concat T tail ys))
let nil = λys ys
(~xs P cons nil ys)