Generates the powerset S as a List of a List, where |S| <= n
Generates the powerset S as a List of a List, where |S| <= n
type of the list
list
upperbound for the powerset
bounded powerset
For each 3rd component which occurs in the list, remove all but the last element with that 3rd component.
Given a list xs, returns a list of copies of xs without the first, second, ..., last element.
Performs a map with an accumulator.
Performs a map with an accumulator. Useful for e.g. mapping a custom counter onto a collection.
The mapping function. Takes an accumulator and an element from the list and returns a tuple of the new accumulator value and the mapped list element.
The initial accumulator value.
The list on which to perform the map.
The mapped list and the final value of the accumulator.
Cartesian product of two lists
Cartesian product of an arbitrary list of lists
all lists obtainable by concatenating one from s1 with one from s2