# # This software is Copyright 2005 by Elsevier Inc. You may use it # under the terms of the license at http://perl.plover.com/hop/LICENSE.txt . # ### ### cmap ### ## Chapter 7 section 2 sub cmap (&) { my $f = shift; my $r = sub { my @result; for (@_) { push @result, $f->($_); } @result; }; return $r; }