Logo

Programming-Idioms

History of Idiom 12 > diff from v9 to v10

Edit summary for version 10 by :

Version 9

2015-08-20, 08:00:31

Version 10

2015-08-20, 14:57:21

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;
Code
bool here = canFind(items, x);
Comments bubble
canFind(haystack_, needle_)