how to define infix function

Andrea Fontana nospam at example.com
Mon Jun 4 10:06:46 UTC 2018


On Saturday, 2 June 2018 at 23:17:48 UTC, Simen Kjærås wrote:
> unittest
> {
>     import std.algorithm.comparison;
>
>     alias min = Operator!(std.algorithm.comparison.min);
>
>     assert(1 /min/ 3 == 1);
> }
>

Why not:

alias Δ = Operator!(std.algorithm.comparison.min);
assert(1 /Δ/ 3 == 1);

To improve readibility :)


More information about the Digitalmars-d-learn mailing list