sub upto { my ($m, $n) = @_; return Iterator { return $m <= $n ? $m++ : undef; }; } sub Iterator (&) { return $_[0]; }