Created
November 20, 2015 02:42
-
-
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
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
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