-
-
Save zoffixznet/2c2b0adcbff28412d5284fb65a1fd401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6 foo.p6 | |
Not consumed yet | |
touched in: | |
-> sink-all (SETTING::src/core/Any-iterable-methods.pm:459) | |
-> sink (SETTING::src/core/Seq.pm:195) | |
-> <anon> (foo.p6:2) | |
-> CALL-ME (SETTING::src/core/Routine.pm:85) | |
-> map (SETTING::src/core/Any-iterable-methods.pm:17) | |
-> map (SETTING::src/core/Any-iterable-methods.pm:11) | |
-> foo (foo.p6:11) | |
-> <unit> (foo.p6:1) | |
ABCAlready consumed | |
touched in: | |
-> sink-all (SETTING::src/core/Any-iterable-methods.pm:459) | |
-> sink (SETTING::src/core/Seq.pm:195) | |
-> <anon> (foo.p6:2) | |
-> CALL-ME (SETTING::src/core/Routine.pm:85) | |
-> map (SETTING::src/core/Any-iterable-methods.pm:17) | |
-> foo (foo.p6:11) | |
-> <unit> (foo.p6:1) | |
Not consumed yet | |
touched in: | |
-> sink-all (SETTING::src/core/Any-iterable-methods.pm:459) | |
-> sink (SETTING::src/core/Seq.pm:195) | |
-> <anon> (foo.p6:2) | |
-> CALL-ME (SETTING::src/core/Routine.pm:85) | |
-> map (SETTING::src/core/Any-iterable-methods.pm:17) | |
-> is-runtime (SETTING::src/core/Backtrace.pm:321) | |
-> anon (SETTING::src/core/Exception.pm:339) | |
-> print_exception (SETTING::src/core/Exception.pm:327) | |
-> <anon> (SETTING::src/core/Exception.pm:421) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nqp; | |
Seq.^lookup("iterator").wrap: method (|) { | |
say nqp::defined(nqp::getattr(self, Seq, '$!iter')) | |
?? 'Not consumed yet' !! 'Already consumed'; | |
say "touched in: "; | |
for 3..20 { try say "\t -> {.name || <anon>} ({.file}:{.line})" with callframe($_).code } | |
put(); | |
nextsame; | |
}; | |
sub foo { | |
my $s := <a b c>.map: *.uc; | |
.print for $s; | |
.print for $s; | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment