add map method to Data::Perl::Stream::Array
[dbsrgits/DBIx-Data-Store-old.git] / lib / Data / Perl / Stream / Array.pm
index 7c0cd09..8d4f325 100644 (file)
@@ -15,6 +15,10 @@ method next {
   return shift @$ary;
 }
 
+method map ($map_func) {
+  ref($self)->new(array => [ map { $map_func->($_) } @{$self->_array} ]);
+}
+
 __PACKAGE__->meta->make_immutable;
 
 1;