9 releases

0.1.8 Apr 12, 2022
0.1.7 Sep 19, 2019
0.1.4 Aug 28, 2019

#1992 in Rust patterns

Download history 3/week @ 2024-02-16 7/week @ 2024-02-23 1/week @ 2024-03-01 1/week @ 2024-03-08 44/week @ 2024-03-29 11/week @ 2024-04-05

55 downloads per month

Apache-2.0

25KB
556 lines

funlib

Rust functional library

Just a lib to help me do some basic functional composition. Its still a work in progress


lib.rs:

Functional Libary for Rust

This is still a work in progess..

Functor

use funlib::Functor;

let s = Some(3).fmap(|&a| a * 2); // this will produce Some(6)

Monad

use funlib::Monad;

let s = Some(3).bind(|&a| Some(a * 2)); // this will produce Some(6)

Dependencies