Idiom #28 Sort by a property
Sort the elements of the list (or array-like collection) items in ascending order of x.p, where p is a field of the type Item of the objects in items.
Idiom #124 Binary search for a value in sorted array
Write the function binarySearch which returns the index of an element having the value x in the sorted array a, or -1 if no such element exists.
Idiom #13 Iterate over map keys and values
Access each key k with its value x from an associative array mymap, and print them.
Idiom #3 Create a procedure
Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)
Idiom #113 Iterate over map entries, ordered by values
Print each key k with its value x from an associative array mymap, in ascending order of x.
Multiple entries may exist for the same value x.
Idiom #12 Check if list contains a value
Check if the list contains the value x.
list is an iterable finite container.
Idiom #108 Determine if variable name is defined
Print the value of variable x, but only if x has been declared in this program.
This makes sense in some languages, not all of them. (Null values are not the point, rather the very existence of the variable.)
Idiom #119 Deduplicate list
Remove duplicates from the list x.
Explain if the original order is preserved.