Update series.aggregate signature to accept function