Crate tool

Source
Expand description

A grab-bag of functional tools.

Modules§

empty
Traits and functions for determining if some collection is empty.
functor
Higher-order functions (functions that operate on functions)
misc
Miscellaneous functions that don’t really have a home.
monad
Useful traits and functions for working with monads (Option/Result).
prelude
Useful functions to glob import.
sequence
A bunch of traits and functions for working with sequences.

Functions§

compose
Compose two functions.
default
Return a default value.
empty
True if the value is “empty”
first
Get the first element of a sequence with at least one element.
fix
A Y-Combinator.
flip
Flip the argument order of a two-parameter function.
id
The identity function.
non_empty
False if the value is “empty”
ok
Converts Result-like values into Options.
second
Get the second element of a sequence with at least to elements
third
Get the third element of a sequence with at least three elements.
uncons
Split a sequence of at least one item into a head and tail.
unwrap
Unwraps the value.