infix_fn

Crates.ioinfix_fn
lib.rsinfix_fn
version0.1.1
created_at2025-02-06 12:59:10.271507+00
updated_at2025-02-06 13:00:55.538319+00
descriptionProcedural macro used to make infix function calls similarly to Haskell's syntax with pound (#) instead of backticks (`)
homepage
repository
max_upload_size
id1545514
size6,961
1K2S (1Git2Clone)

documentation

README

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));
Commit count: 0

cargo fmt