cgp-field 0.8.0-alpha

A language extension for Rust, with pluggable trait implementations at compile-time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::types::{Cons, Nil};

pub trait ConcatProduct<Items> {
    type Output;
}

impl<Items> ConcatProduct<Items> for Nil {
    type Output = Items;
}

impl<Head, Tail, Items> ConcatProduct<Items> for Cons<Head, Tail>
where
    Tail: ConcatProduct<Items>,
{
    type Output = Cons<Head, Tail::Output>;
}