Function lambda_calculus::list::tail
[−]
[src]
pub fn tail() -> Term
Equivalent to pair::second(); applied to a Church-encoded list it returns a new list with all its
elements but the first one.
TAIL := SECOND
Example
use lambda_calculus::term::Term; use lambda_calculus::list::tail; use lambda_calculus::arithmetic::{zero, one}; use lambda_calculus::reduction::beta_full; let list_110 = Term::from(vec![one(), one(), zero()]); assert_eq!(beta_full(tail().app(list_110)), Term::from(vec![one(), zero()]));