Skip to content

Instantly share code, notes, and snippets.

@pjlsergeant
Created November 5, 2012 13:48
Show Gist options
  • Select an option

  • Save pjlsergeant/4017266 to your computer and use it in GitHub Desktop.

Select an option

Save pjlsergeant/4017266 to your computer and use it in GitHub Desktop.
List::SubFunctions
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