sub sum { my ($term, $a, $next, $b) = @_; if ($a > $b) { return(0); } else { return( &$term($a) + &sum( &$term, (&$next($a)), (&$next($b +)) ) ); } }
In reply to Re: Passing subroutines as arguments
by @ncientgoose
in thread Passing subroutines as arguments
by mvaline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |