mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00: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:
parent
a6ea67e733
commit
7243f13fc6
@ -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 !!
|
||||
|
Loading…
Reference in New Issue
Block a user