Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created September 26, 2018 15:03
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 zoffixznet/d97470f57cda6aa24ac0480e52ce5660 to your computer and use it in GitHub Desktop.
Save zoffixznet/d97470f57cda6aa24ac0480e52ce5660 to your computer and use it in GitHub Desktop.
use blockless-if;
if nqp::isge_i(nqp::getattr_i($!cursor,Match,'$!pos'),0) {
$pulled := $!cursor,
$!cursor := $!move($!cursor);
$!post($pulled);
} else {
IterationEnd
}
$pulled := $!cursor,
$!cursor := $!move($!cursor);
$!post($pulled);
if nqp::isge_i(nqp::getattr_i($!cursor,Match,'$!pos'),0) {
$pulled := $!cursor,
$!cursor := $!move($!cursor);
$!post($pulled);
} else {
IterationEnd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment