mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 15:10:46 +03:00
Better variable naming.
This commit is contained in:
parent
5517fe1bcd
commit
6a98d6ba03
1 changed files with 3 additions and 3 deletions
|
@ -2207,13 +2207,13 @@ template canFind(alias pred="a == b")
|
||||||
*/
|
*/
|
||||||
@safe unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
auto words1 = [
|
auto words = [
|
||||||
"apple",
|
"apple",
|
||||||
"beeswax",
|
"beeswax",
|
||||||
"cardboard"
|
"cardboard"
|
||||||
];
|
];
|
||||||
assert(!canFind(words1, "bees"));
|
assert(!canFind(words, "bees"));
|
||||||
assert( canFind!((string a, string b) => a.startsWith(b))(words1, "bees"));
|
assert( canFind!((string a, string b) => a.startsWith(b))(words, "bees"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@safe unittest
|
@safe unittest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue