Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created November 21, 2016 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/09a9b0bca9460df8936df0c88c7459d9 to your computer and use it in GitHub Desktop.
Save zoffixznet/09a9b0bca9460df8936df0c88c7459d9 to your computer and use it in GitHub Desktop.
class Card2 {
BEGIN my @faces = <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>;
subset Face of Str where * eq @faces.any;
has Face $.face is required;
}
dd Card2.new(:face('2'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment