Template that generates sort of infix functions. To use generated function, surround it with any of overloadable binary operators.
adr thinks this is disgusting.
function that takes two arguments, lhs and rhs respectively
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));
See Implementation
Template that generates sort of infix functions. To use generated function, surround it with any of overloadable binary operators.
adr thinks this is disgusting.