sub head { $_[0] } sub tail { @_[1..$#_] } sub prod_list { 1 == @_ ? head @_ : (head @_) * prod_list( tail @_ ) }