infix_fn 0.1.1

Procedural macro used to make infix function calls similarly to Haskell's syntax with pound (#) instead of backticks (`)
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 6.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 285.16 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 1Git2Clone

Infix macro

Build IconDocs IconVersion IconLicense Icon

A very simple procedural macro used to make infix function calls similarly to Haskell's syntax (# instead of ```).

Table of contents

Example

use infix_fn::infix;

// Function definition:
fn add(lhs: i32, rhs: i32) -> i32 {
  lhs + rhs
}

// Macro usage:
let (lhs, rhs) = (6, 9);
assert_eq!(lhs + rhs, infix!(lhs # add # rhs));