intersection function
The elements that are in every one of some lists.
How to write it
intersection(a, b, ...)
- a
- A list. Takes a list.
- b
- A list. Takes a list.
Examples
intersection([1, 2], [2, 3])In the solver,
Open in the solverintersection([1, 2], [2, 3])gives[2].
Related functions
- join
Join lists into one.
- head
The head of an expression: the name of the function it is a call of.
- last
The last element of a list.
- fold_list
The steps of fold: every partial result, starting from the first value.
- length
Number of elements in a list.
- fold
Combine the elements of a list from the left with a function, starting from a value.