Skip to content

Commit

Permalink
Get note in line with say (with all the quirks)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 27, 2015
1 parent ab4d41f commit fffbe76
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/core/io_operators.pm
Expand Up @@ -42,13 +42,15 @@ multi sub note(Str:D \x) {
$err.print: x;
$err.print-nl;
}
# XXX GLR casualty
#multi sub note(\x) {
# my $err := $*ERR;
# $err.print: x.gist;
# $err.print-nl;
#}
multi sub note(*@args is rw) {
multi sub note(\args) {
my $err := $*ERR;
my \iterator := nqp::istype(args, Iterable) ?? args.iterator !! args.list.iterator;
until (my \value := iterator.pull-one) =:= IterationEnd {
$err.print(value.gist);
}
$err.print-nl;
}
multi sub note(**@args is rw) {
my $err := $*ERR;
$err.print(.gist) for @args;
$err.print-nl;
Expand Down

0 comments on commit fffbe76

Please sign in to comment.