Skip to content

Instantly share code, notes, and snippets.

@ElenaMerelo
Last active January 8, 2017 11:57
Show Gist options
  • Save ElenaMerelo/3903f46a2d492dd0b76151054a598721 to your computer and use it in GitHub Desktop.
Save ElenaMerelo/3903f46a2d492dd0b76151054a598721 to your computer and use it in GitHub Desktop.
Deck of cards which can be shuffled

#Deck of cards First we pick a random card, then in the second line we shuffle the whole deck of cards, including the one chosen

((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ <♥,♦,♣,♠>).roll

((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ <♥,♦,♣,♠>).pick(52)
@ElenaMerelo
Copy link
Author

Made in Perl6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment