mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Added usage example to equal
This commit is contained in:
parent
96f092bf0e
commit
3c06aae6e5
1 changed files with 1 additions and 0 deletions
|
@ -794,6 +794,7 @@ template equal(alias pred = "a == b")
|
|||
int[] a = [ 1, 2, 4, 3 ];
|
||||
assert(!equal(a, a[1..$]));
|
||||
assert(equal(a, a));
|
||||
assert(equal!((a, b) => a == b)(a, a));
|
||||
|
||||
// different types
|
||||
double[] b = [ 1.0, 2, 4, 3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue