Peano

Macro Peano 

Source
macro_rules! Peano {
    ($expr:expr) => { ... };
}
Expand description

Converts an integer constant to a peano integer

This macro is just sugar for the FromUsize type alias

ยงExample

use nlist::{NList, nlist, Peano};

let list_0: NList<u8, Peano!(0)> = nlist![];
let list_1: NList<u8, Peano!(1)> = nlist![3];
let list_2: NList<u8, Peano!(2)> = nlist![3, 5];
let list_3: NList<u8, Peano!(3)> = nlist![3, 5, 8];