Created
January 17, 2020 18:45
-
-
Save Whateverable/7f0d40d271b68dad0620b1f80b29d1d3 to your computer and use it in GitHub Desktop.
evalable6
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
my @a=^10;@a.kv.map(->$idx,$val {for @[$idx .. *] -> $b {if {$val==$b}{last}; LAST {say $val~","~$b}}}) |
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
(exit code 1) | |
===SORRY!=== | |
Function 'last' needs parens to avoid gobbling block | |
at /tmp/QpAg5vbm_h:1 | |
------> l {for @[$idx .. *] -> $b {if {$val==$b}⏏{last}; LAST {say $val~","~$b}}}) | |
Missing block (apparently claimed by 'last') | |
at /tmp/QpAg5vbm_h:1 | |
------> @[$idx .. *] -> $b {if {$val==$b}{last}⏏; LAST {say $val~","~$b}}}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment