#functional #grab-bag

no-std tool

A grab-bag of tools for functional programming

7 releases

Uses old Rust 2015

0.2.1 Oct 2, 2018
0.2.0 Sep 15, 2016
0.1.5 Sep 15, 2016

#108 in #functional

Download history 10/week @ 2026-08-03 11/week @ 2026-08-10 12/week @ 2026-08-17 10/week @ 2026-08-24 11/week @ 2026-08-31 24/week @ 2026-09-07 10/week @ 2026-09-14 54/week @ 2026-09-21 15/week @ 2026-09-28 8/week @ 2026-10-05 19/week @ 2026-10-12 10/week @ 2026-10-19 11/week @ 2026-10-26 21/week @ 2026-11-02 17/week @ 2026-11-09 29/week @ 2026-11-16

80 downloads per month
Used in 2 crates

MIT/Apache

20KB
465 lines

Tool

A grab-bag of useful functions for functional programming.

Example

Non-empty strings

extern crate tool;
use tool::prelude::*;
fn main() {
    let strings: Vec<_> = vec!["my string", "", "asdf", ""]
        .into_iter()
        .filter(non_empty)
        .collect();
    assert_eq!(strings, vec!["my string", "asdf"]);
}

First item in an iterator of tuples.

extern crate tool;
use tool::prelude::*;
fn main() {
    let strings: Vec<_> = vec![("first", 1), ("second", 2), ("third", 3), ("fourth", 4)]
        .into_iter()
        .map(first)
        .collect();

    assert_eq!(strings, vec!["first", "second", "third", "fourth"]);
}

Compile-Time Flags (cargo features)

  • use_std (default: enabled) - Disable this if you're project doesn't depend on libstd.

No runtime deps

Features