Infix

Template that generates sort of infix functions. To use generated function, surround it with any of overloadable binary operators.

adr thinks this is disgusting.

@safe
template Infix (
alias fun
) {}

Members

Manifest constants

Infix
enum Infix;
Undocumented in source.

Structs

Impl
struct Impl
Undocumented in source.

Parameters

fun

function that takes two arguments, lhs and rhs respectively

Examples

enum w = Infix!((a, b) => a + b);
enum map = Infix!((a, b) => from!"std".map!(a => a.b)(a));
assert(2 ~w~ 3 == 5);
assert([1, 2, 3] <<map>> ((int a) => a * a));

Meta