Crate funlib

Source
Expand description

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)

Modules§

Foldable
Foldable mod containing the foldable type classes
applicative
Applicative implementations and tests
foldable
Foldable implementations and tests
functor
Functor implementations and tests
monad
Monad implementations and tests
monoid
Monoid implementations and tests
semigroup
Semigroup implementations and tests

Traits§

Applicative
Applicative type class
Functor
Functor type class
HKST
Higher kinded Type helper for M -> M
HKT
Higher Kinded Type helper for M -> M
Monad
Monad type class
Monoid
Monoid type class extends the Semigroup and adds an empty function for the type
Semigroup
Semigroup type class