tail

Function tail 

Source
pub fn tail() -> Term
Expand description

Applied to a Scott-encoded list it returns a new list with all its elements but the first one.

TAIL ≡ λl.l UD (λht.t) ≡ λ 1 UD (λ λ 1)

§Example

use lambda_calculus::data::list::scott::tail;
use lambda_calculus::*;

let list = vec![1, 2, 3].into_scott();

assert_eq!(
    beta(app(tail(), list), NOR, 0),
    vec![2, 3].into_scott()
);