projects
/
dbsrgits/DBIx-Data-Store-old.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
add map method to Data::Perl::Stream::Array
[dbsrgits/DBIx-Data-Store-old.git]
/
lib
/
Data
/
Perl
/
Stream
/
Array.pm
diff --git
a/lib/Data/Perl/Stream/Array.pm
b/lib/Data/Perl/Stream/Array.pm
index
7c0cd09
..
8d4f325
100644
(file)
--- a/
lib/Data/Perl/Stream/Array.pm
+++ b/
lib/Data/Perl/Stream/Array.pm
@@
-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;