projects
/
dbsrgits/DBIx-Data-Store-old.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
5c69324
)
add map method to Data::Perl::Stream::Array
Matt S Trout [Sat, 20 Feb 2010 22:37:11 +0000 (22:37 +0000)]
lib/Data/Perl/Stream/Array.pm
patch
|
blob
|
blame
|
history
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;