mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-16 19:54:38 +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:
@@ -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