NAME Coro::Generator - Create generators using Coro SYNOPSIS use 5.10.0; # This module does NOT require 5.10, but 'say' does use strict; use Coro::Generator; my $even = generator { my $x = 0; while(1) { $x++; $x++; yield $x; } }; for my $i (1..10) { say $even->(); } DESCRIPTION In the words of wikipedia, generators look like functions but act like iterators. EXPORT generator, yield SEE ALSO Coro A
![Coro::Generator](https://cdn-ak-scissors.b.st-hatena.com/image/square/c4a607b5430575638fd9a7f233e073d867af4bb7/height=288;version=1;width=512/https%3A%2F%2Fmetacpan.org%2Fstatic%2Fimages%2Fdots.png)