lambda-types

Crates.iolambda-types
lib.rslambda-types
version0.2.1
sourcesrc
created_at2024-09-06 16:25:45.189117
updated_at2024-09-06 19:14:29.293346
descriptionPuts the lambda calculus in Rust...'s type system.
homepage
repositoryhttps://github.com/balt-dev/lambda-rs
max_upload_size
id1366126
size178,920
Balt (balt-dev)

documentation

https://docs.rs/lambda-types/

README

lambda-rs

"Lambda calculus? In my type system?" (It's more likely than you think.)

An implementation of the Lambda Calculus in Rust, only using ZSTs, traits, and generics.

use lambda_types::prelude::*;

type Two = call! { Successor, Successor, Zero  };
type Three = call! { Successor, Two  };
type Six = call! { Multiply, Three, Two };
type Seven = call! { Successor, Six };

static THE_MEANING_OF_LIFE: call! {
    ToNumber { Multiply, Six, Seven }
} = ConstNumber::<{b'*' as u64}>; // 42

Commit count: 0

cargo fmt