1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-17 12:10:52 +02:00

thrice .... gather ^3 counts three times "0 1 2" not 5

Probably just a paste-o mistake.  Want to count 3 times not 5.
This commit is contained in:
ronaldxs
2015-03-20 16:40:25 -04:00
parent a6ea67e733
commit 7243f13fc6

View File

@@ -963,7 +963,7 @@ say join ',', gather if False {
# But consider: # But consider:
constant thrice = gather for ^3 { say take $_ }; # Doesn't print anything constant thrice = gather for ^3 { say take $_ }; # Doesn't print anything
# versus: # versus:
constant thrice = eager gather for ^3 { say take $_ }; #=> 0 1 2 3 4 constant thrice = eager gather for ^3 { say take $_ }; #=> 0 1 2
# - `lazy` - Defer actual evaluation until value is fetched (forces lazy context) # - `lazy` - Defer actual evaluation until value is fetched (forces lazy context)
# Not yet implemented !! # Not yet implemented !!