# New Ticket Created by  Elizabeth Mattijsen 
# Please include the string:  [perl #126423]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126423 >


[23:21:43]  <lizmat>    m: sub aa { for @_ { .say } }; aa 42
[23:21:43]  <+camelia>  rakudo-moar 009400: OUTPUT«42␤»
[23:21:55]  <lizmat>    m: sub aa { if @_ { for @_ { .say } } }; aa 42
[23:21:55]  <+camelia>  rakudo-moar 009400: ( no output )
[23:22:15]  <lizmat>    m: sub aa { if @_ { say @_ } }; aa 42
[23:22:15]  <+camelia>  rakudo-moar 009400: OUTPUT«[]␤»
[23:22:33]  <lizmat>    seems all wrong to me ?
[23:24:39]  <lizmat>    looks like an "if @_" eats @_ ?
[23:27:42]  <grondilu>  m: { @_ && { .say for @_ } }(42)
[23:27:42]  <+camelia>  rakudo-moar 009400: ( no output )
[23:28:09]  <grondilu>  m: { @_ && "ok" }(42)
[23:28:09]  <+camelia>  rakudo-moar 009400: ( no output )
[23:28:17]  <grondilu>  m: say { @_ && "ok" }(42)
[23:28:18]  <+camelia>  rakudo-moar 009400: OUTPUT«ok␤»
[23:28:35]  <PerlJam>   m: sub foo { if @_ { say "hi: @_[]" } }; foo 42;
[23:28:36]  <+camelia>  rakudo-moar 009400: OUTPUT«hi: ␤»
[23:28:59]  <grondilu>  m: say { @_ && @_ }(42)
[23:28:59]  <+camelia>  rakudo-moar 009400: OUTPUT«[42]␤»
[23:29:14]  <PerlJam>   m: sub foo { say @_.WHAT }; foo 42;
[23:29:14]  <+camelia>  rakudo-moar 009400: OUTPUT«(Array)␤»
[23:30:01]  <grondilu>  m: { @_ && { .say for @_ }() }(42)
[23:30:02]  <+camelia>  rakudo-moar 009400: ( no output )
[23:30:09]  <grondilu>  m: { @_ && { .say for @_ }(@_) }(42)
[23:30:10]  <+camelia>  rakudo-moar 009400: OUTPUT«42␤»
[23:30:37]  grondilu    stops pretending he has an idea of what's going on there
[23:32:05]  <PerlJam>   m: sub foo { say @_; if @_ { say @_ } }; foo 42;
[23:32:05]  <+camelia>  rakudo-moar 009400: OUTPUT«[42]␤[]␤»
[23:32:23]  <PerlJam>   I think it's some kind of iterator problem.
[23:38:00]  <PerlJam>   m: sub foo { say @_; if @_ { say @_; }; say @_ }; foo 
42;
[23:38:00]  <+camelia>  rakudo-moar 009400: OUTPUT«[42]␤[]␤[42]␤»
[23:38:30]  <PerlJam>   or ... maybe @_ is getting bound to the if's block 
rather than the subs block

Reply via email to