Skip to content

Instantly share code, notes, and snippets.

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