hho
12/19/2018, 12:51 PMS
is the type of the accumulator (and therefore also the return type).Abdul Kadir
12/19/2018, 1:12 PMblogscot
12/19/2018, 1:14 PMreduce
the accumulator type is determined by the first element of the list being processed. I’ve linked an example:
https://pl.kotl.in/HyrqmCweNhho
12/19/2018, 1:32 PMS
as the type of the first argument in the lambda. This can be any supertype of the collections element type: https://pl.kotl.in/rk0XOTwx4Abdul Kadir
12/20/2018, 5:16 AM