Merge pull request #1 from doiken/improve-islice
check if defined when islice
Michael Roberts authored 6 years ago
GitHub committed 6 years ago
323 | 323 | ref($src)->new(sub{ |
324 | 324 | return if $next < 0; |
325 | 325 | my $rv; |
326 | while($rv = $src->()) { | |
326 | while(defined($rv = $src->())) { | |
327 | 327 | if($idx++ == $next) { |
328 | 328 | $next += $step; |
329 | 329 | if($end > 0 and $next >= $end) { |