currycompose 0.1.0

A crate providing a trait for performing currying (and non-currying) function-composition in rust.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented3 out of 4 items with examples
  • Size
  • Source code size: 13.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.02 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
  • sigurd4/currycompose
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sigurd4

currycompose

A crate providing a trait for performing currying (and non-currying) function-composition in rust.

A can be composed with B if A implements FnOnce and takes one or more argument, while B implements FnOnce and returns something of the same type as the first argument of A.

  • For instance (A, B) -> Y can be composed with (C) -> A, yiedling (B, C) -> Y (currying).

  • Composing (A, B) -> Y with (C) -> A then with (D) -> B yields (C, D) -> Y (currying twice).

  • While of course (A) -> Y composed with (B) -> A, yields (B) -> Y as expected (non-currying composition).

Currying functions which implement FnMut or Fn will yield something also implementing FnMut/Fn if both operands do.