Logo

Programming-Idioms

History of Idiom 12 > diff from v10 to v11

Edit summary for version 11 by :

Version 10

2015-08-20, 14:57:21

Version 11

2015-08-20, 14:57:35

Idiom #12 Check if list contains a value

Check if list contains a value x.
list is any iterable finite container.

Idiom #12 Check if list contains a value

Check if list contains a value x.
list is any iterable finite container.

Imports
import std.algorithm.searching;
Imports
import std.algorithm.searching;
Code
bool here = canFind(items, x);
Code
bool here = canFind(items, x);
Comments bubble
canFind(haystack_, needle_)
Comments bubble
canFind(haystack, needle)