Logo

Programming-Idioms

History of Idiom 12 > diff from v80 to v81

Edit summary for version 81 by jtang:
[Kotlin] Simpler way of checking

Version 80

2019-09-26, 17:37:28

Version 81

2019-09-26, 18:09:24

Idiom #12 Check if list contains a value

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

Illustration

Idiom #12 Check if list contains a value

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

Illustration
Extra Keywords
array vector
Extra Keywords
array vector
Code
list.contains(x)
Code
x in list