Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created September 6, 2015 19:24
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 FROGGS/5c502310bf7d5424246f to your computer and use it in GitHub Desktop.
Save FROGGS/5c502310bf7d5424246f to your computer and use it in GitHub Desktop.
# added a new new:
multi method new(*@a, *%h) {
say @a.perl;
say %h.perl;
nqp::create(self).BUILD('foo', 42)
}
# code:
perl6 -e 'say (:a(1) :b(2)).perl'
# got:
["b"]
{:value(2)}
(:a(1), :foo(42))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment