2 ms·
I can for instance do type throw is (ROCK, PAPER, SCISSORS); type result is (ME, YOU, DRAW); winner : array (throw, throw) of result := ( (DRAW, YOU
by Avshalom 11y ago
I can for instance do
type throw is (ROCK, PAPER, SCISSORS);
type result is (ME, YOU, DRAW);
winner : array (throw, throw) of result := (
(DRAW, YOU, ME),
(YOU, DRAW, ME),
(ME, YOU, DRAW));
YOU = winner(ROCK, PAPER); --would evaluate to true
because types are cool.