How to make a function to work with a collection of any Numeric type in Scala

后端 未结 0 1735
傲寒
傲寒 2021-01-15 03:40

I would like to create a function that can take any Collection: List, Array ... of any type and sum the values inside. I tried something like this. But Using AnyVal instead

相关标签:
回答
  • 消灭零回复
提交回复
热议问题