Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a convenient way of getting a Supply that will simply emit a single argument and then be done (or quit if the process of producing the argument throws an exception). Given the program `my $s = supply emit 42; for ^100_000 { react whenever $s { } }`, this results in it running in 78% of the time it would without this optimization.
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters