1 unstable release
0.0.1 | Dec 27, 2022 |
---|
#7 in #greatest
15KB
437 lines
dish
dish provides several extensions for Rust's libcore.
Examples:
Find greatest count divisor of minimal and maximal numbers in a vector of usize:
use dish::prelude::*;
fn mmgcd(src: Vec<usize>) -> usize {
src.into_iter()
.min_max_pipe(Number::gcd)
.unwrap()
}
Find sum of all digits of a number:
use dish::prelude::*;
fn dgsum<T: Number>(n: T) -> u8 {
n.digits()
.sum()
}
lib.rs
:
dish provides several additions to libcore.