Add "avg" method
The collection.avg() method returns the average of all collection items:
Example
await Collect([1, 2, 3, 4])
.avg()
// 2,5
Bonus
Create an alias method .average() that calls .avg() internally.
Hi, I can work on this.
@fernandadagostin Hey Fernanda, thank you for your support! Someone else already submitted a PR #14
This PR requires some additional work. I'll ask Dominik (@StuckD) for refinements. If he's willing to change the code, I'll favor his PR when merging. Sorry.
If you're still interested in a contribution, I'd love to see a "max" method in the collections package. I'll go ahead and create an issue and mention you. Is that ok for you?
That's perfect!
@fernandadagostin Awesome, thank you!