dish

Crates.iodish
lib.rsdish
version0.0.1
sourcesrc
created_at2022-12-27 17:35:45.707236
updated_at2022-12-27 17:35:45.707236
descriptionAddition to core
homepage
repositoryhttps://github.com/mrMiiao/dish
max_upload_size
id746357
size14,915
(mrMiiao)

documentation

README

crates.io License Documentation

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()
}
Commit count: 1

cargo fmt