Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lizmat
Created November 20, 2015 02:42
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 lizmat/5d452c8a8eb7a000bd2c to your computer and use it in GitHub Desktop.
Save lizmat/5d452c8a8eb7a000bd2c to your computer and use it in GitHub Desktop.
more idiomatic solution to http://blog.64p.org/entry/2015/10/30/073514
use v6;
my $obj = [1,2,3];
my $iter = $obj.iterator;
my $next;
until ($next := $iter.pull-one) =:= IterationEnd {
say $next;
}
say "done";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment