1 unstable release
0.1.0 | Oct 19, 2019 |
---|
#88 in #lookup
9KB
195 lines
numeric-lut
A library for generating numeric lookup functions. Currently, it requires the use of the
proc_macro_hygiene
nightly feature.
Examples
#![feature(proc_macro_hygiene)]
let lut = numeric_lut::lut!(|x @ 0..8, y @ 0..16| -> u32 { x as u32 + y as u32 });
let x = lut(3, 10);
assert_eq!(13, x);
Dependencies
~1.5MB
~36K SLoC