Created
November 5, 2012 13:48
-
-
Save pjlsergeant/4017266 to your computer and use it in GitHub Desktop.
List::SubFunctions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package List::SubFunctions; | |
| sub smap (&@) { | |
| my $sub = shift; | |
| map {$sub->($_)} @_; | |
| } | |
| sub sgrep (&@) { | |
| my $sub = shift; | |
| grep {$sub->($_)} @_; | |
| } | |
| 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment