Predefined function reference

set_cartesian_product

A reference entry for set_cartesian_product

Predefined function · set

set_cartesian_product (list l, list m) ⇒ list

Generates a new set that is the Cartesian Product of two sets l and m. Output will be a list of lists. For example given two lists [1, 2] and [3, 4], the result will be:
[[1, 3], [1, 4], [2, 3], [2, 4]].