mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-07-31 12:00:34 +02:00
Merge pull request #1012 from ronaldxs/patch-1
thrice .... gather ^3 counts three times "0 1 2" not 5
This commit is contained in:
@@ -963,7 +963,7 @@ say join ',', gather if False {
|
||||
# But consider:
|
||||
constant thrice = gather for ^3 { say take $_ }; # Doesn't print anything
|
||||
# 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)
|
||||
# Not yet implemented !!
|
||||
|
Reference in New Issue
Block a user