pub fn append() -> TermExpand description
Applied to two pair-encoded lists it concatenates them.
APPEND ≡ Z (λzab.IS_NIL a (λx.b) (λx.CONS (HEAD a) (z (TAIL a) b)) I) ≡ Z (λ λ λ IS_NIL 2 (λ 2) (λ CONS (HEAD 3) (4 (TAIL 3) 2)) I)
§Example
use lambda_calculus::data::list::pair::append;
use lambda_calculus::*;
let list1 = vec![1.into_church(), 2.into_church()].into_pair_list();
let list2 = vec![3.into_church(), 4.into_church()].into_pair_list();
assert_eq!(
beta(app!(append(), list1, list2), NOR, 0),
vec![1.into_church(), 2.into_church(), 3.into_church(), 4.into_church()].into_pair_list()
);