logic.spad line 129 [edit on github]
splitting lists
cartesian([S1, S2, ...])
returns the set of lists [s1
, s2
, ...] with si
in Si
cartesianPower(S, n)
returns the n
-th cartesian power of the list S
minShift(l)
returns the lexicographically minimal cyclic rotation of the list l
leftShift(l)
rotates the list l
to the left and inserts the first element at the end
splitList(f, x)
splits the list x
into a yes part and a no part according to the boolean function f
topologicalSort(xx)
returns a rearrangement of the elements which is compatible with the partial order. (Martin Baker) I
added this version because predicate function can be difficult to work with so use table instead.
topologicalSort(xx)
returns a rearrangement of the elements which is compatible with the partial order.
topologicalSort(xx)
returns a rearrangement of the elements which is compatible with the partial order. The argument list xx
is destroyed.