partialize 0.1.0

Generic partial application library.
Documentation
  • Coverage
  • 0%
    0 out of 137 items documented0 out of 132 items with examples
  • Size
  • Source code size: 53.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ErisianArchitect/partialize
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ErisianArchitect

partialize

partialize is a simple partial application library written in Rust.

Example

#[derive(Clone)]
struct Foo(&'static str);
fn foo(arg0: &str, arg1: Foo) {
    println!("{}, {}", arg0, arg1.0);
}
let partial1 = foo.partial1("test");
partial1(Foo("foo"));
partial1(Foo("bar"));
let partial2 = partial1.partial1_once(Foo("test"));
partial2();
let partial3 = partial1.partial1_clone(Foo("Hello"));
partial3();
partial3();
foo.partial1("test")(Foo("test"));

Disclaimer

There's a lot of LSP overhead when there are a lot of generics involved, so this library only implements partial application for functions with up to 8 arguments. I've included the script for generating the code with the repository for your convenience.

NO AI WAS USED IN THE CREATION OF THIS LIBRARY.