Skip to content

Commit

Permalink
replace functions with lambda aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Jul 29, 2016
1 parent 016d514 commit 790aada
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/algorithm/sorting.d
Expand Up @@ -1503,9 +1503,9 @@ private template TimSortImpl(alias pred, R)
alias T = ElementType!R;

alias less = binaryFun!pred;
bool greater()(T a, T b){ return less(b, a); }
bool greaterEqual()(T a, T b){ return !less(a, b); }
bool lessEqual()(T a, T b){ return !less(b, a); }
alias greater = (a, b) => less(b, a);
alias greaterEqual = (a, b) => !less(a, b);
alias lessEqual = (a, b) => !less(b, a);

enum minimalMerge = 128;
enum minimalGallop = 7;
Expand Down

0 comments on commit 790aada

Please sign in to comment.