From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

### functor class for One Pass systems
### 1. contains just the functor (use OnePassFunctorWithClassOp.pm for a
### class method instead of a common function)
sub new {
my ($class, $fc) = @_;
$self = { functor => $fc, };
bless $self, $class;
}
sub do {
my ($self, $args) = @_;
return $fc->($args);
}
1;