WaffleLapkin / fntools

Tools for working with functions in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fntools

CI status Telegram LICENSE Documentation (dev)

logo Weird tools for working with functions in rust

let fun = (|a, b| a + b)
    .chain(|x| (x % 2, x % 4))
    .chain(|t, f| (t, f)
         .also(|(t, f)| println!("{}, {}", t, f))
    );
 
assert_eq!(fun(13, 10), (1, 3));


DISCLAIMER

This library more an fun experiment with rust, than really useful library.

However, in some cases it can make code a bit cleaner.

About

Tools for working with functions in rust

License:MIT License


Languages

Language:Rust 100.0%