elves/
lib.rs

1//! `elves` is a collection of common algorithms, parsers, types and traits for advent of code
2
3pub mod parsers;
4pub mod types;
5
6// macros
7
8/// minimum of multiple items by recursively calling `std::cmp::min`
9#[macro_export]
10macro_rules! many_min {
11    ($x: expr) => ($x);
12    ($x: expr, $($z: expr),+) => (::std::cmp::min($x, many_min!($($z),*)));
13}
14
15/// maximum of multiple items by recursively calling `std::cmp::max`
16#[macro_export]
17macro_rules! many_max {
18    ($x: expr) => ($x);
19    ($x: expr, $($z: expr),+) => (::std::cmp::max($x, many_max!($($z),*)));
20}