Set puzzle: Difference between revisions

m
m (Fix Perl6 -> Raku links and comments)
m (→‎{{header|Tailspin}}: syntax update)
Line 3,639:
[ $(1).colour + $(2).colour + $(3).colour, $(1).symbol + $(2).symbol + $(3).symbol,
$(1).number + $(2).number + $(3).number, $(1).shading + $(2).shading + $(3).shading ] -> #
// if it is not an array that contains an elementwhere thatall iselements notof 3, 6 or 9, it is a set
when <~[<~=3|=6|=9>+ VOID]> do $set !
end isSet
 
Line 3,656:
def nSets: $(2);
{} -> #
when <{sets: <[]($nSets..)>}> do $ !
otherwise
<>
def hand: $nCards -> deal;
{hand: $hand, sets: $hand -> findSets} -> #
Anonymous user