Non-transitive dice: Difference between revisions
m
→{{header|R}}: Syntax highlighting.
m (→{{header|Haskell}}: fixed typos) |
ReeceGoding (talk | contribs) m (→{{header|R}}: Syntax highlighting.) |
||
Line 1,885:
=={{header|R}}==
It would not be difficult to adapt this code to meet the stretch goal, but readability would suffer.
<lang
{
diceSet <- unique(t(apply(expand.grid(1:4, 1:4, 1:4, 1:4), 1, sort))) #By construction, each row is a unique dice.
|