Non-transitive dice: Difference between revisions

m
→‎{{header|J}}: fix markup
m (→‎{{header|J}}: minor cleanup)
m (→‎{{header|J}}: fix markup)
Line 378:
}}</lang>
 
Here, <tt>extend</tt> takes a list of die sequences and appends each possibility of a new die where the new die is not less than the last die in the sequence. So, <tt>r</tt> is all such lists of length x. We discard the cases where the last element of the list is not less than the first, rotate each dice index list into canonical order, discard duplicates, and then use these indices to select the associated dice.
 
Task examples:
6,962

edits