Skip to content

Commit 0ba6d45

Browse files
Gianni CeccarelliJJ
authored andcommitted
add a mnemonic for Iterable.race
From IRC: Jun 14 15:37:13 <xinming> Hi, I always get confused about .hyper/.race, which one ensures order of results, the other doesn't, Any hints on how I can remember this? Thx Jun 14 15:37:32 <xinming> I've looked-up the raku doc over and over again :-( Jun 14 15:38:09 <dakkar> xinming: in a `.race`, you never know who's goinig to arrive first Jun 14 15:40:00 <dakkar> xinming: does that help? Jun 14 15:42:26 <xinming> dakkar: got it, thx Jun 14 15:42:38 <xinming> this helped a lot. Jun 14 15:42:48 <dakkar> maybe https://docs.raku.org/type/Iterable#method_race should say that…
1 parent 31bad39 commit 0ba6d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/Type/Iterable.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Returns another Iterable that is potentially iterated in parallel, with a
154154
given batch size and degree of parallelism (number of parallel workers).
155155
156156
Unlike L«C<hyper>|/routine/hyper», C<race> does not preserve the order of
157-
elements.
157+
elements (mnemonic: in a race, you never know who will arrive first).
158158
159159
say ([1..100].race.map({ $_ +1 }).list);
160160

0 commit comments

Comments
 (0)