tcrts 0.1.0

Turing complete rust type system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

pub trait Replace<Index, Value> {
    type Output;
}

impl<H, T, Value> Replace<Zero, Value> for Cons<H, T> {
    type Output = Cons<Value, T>;
}

impl<H, T, Index, Value> Replace<Next<Index>, Value> for Cons<H, T>
where
    Index: Num,
    T: Replace<Index, Value>,
{
    type Output = Cons<H, <T as Replace<Index, Value>>::Output>;
}