Skip to content

Commit bb24012

Browse files
authored
Merge pull request #4776 from NVolcz/patch-3
Added usage example to equal
2 parents 288c21b + 3c06aae commit bb24012

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/algorithm/comparison.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ template equal(alias pred = "a == b")
794794
int[] a = [ 1, 2, 4, 3 ];
795795
assert(!equal(a, a[1..$]));
796796
assert(equal(a, a));
797+
assert(equal!((a, b) => a == b)(a, a));
797798

798799
// different types
799800
double[] b = [ 1.0, 2, 4, 3];

0 commit comments

Comments
 (0)