Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.15 KB

File metadata and controls

27 lines (22 loc) · 1.15 KB

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.