Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created May 21, 2014 13:50
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 jnthn/41dbb7ab7150f6cfd41c to your computer and use it in GitHub Desktop.
Save jnthn/41dbb7ab7150f6cfd41c to your computer and use it in GitHub Desktop.
diff --git a/src/core/IO.pm b/src/core/IO.pm
index 5067ef5..01eb6b7 100644
--- a/src/core/IO.pm
+++ b/src/core/IO.pm
@@ -6,10 +6,17 @@ sub print(|) {
Bool::True
}
-sub say(|) {
+proto sub say(|) { * }
+multi sub say(\x) {
+ my $out := $*OUT;
+ $out.print(x.gist);
+ $out.print("\n");
+}
+multi sub say(|) {
my $args := nqp::p6argvmarray();
- $*OUT.print(nqp::shift($args).gist) while $args;
- $*OUT.print("\n");
+ my $out := $*OUT;
+ $out.print(nqp::shift($args).gist) while $args;
+ $out.print("\n");
}
sub note(|) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment