Back to Lo

It Productby

docs/data/it-productby.md

1.53.0200 B
Original Source

Returns the product of values in the collection using the given transform function.

go
result := it.ProductBy(it.Range(1, 5), func(item int) int {
    return item * 2
})
// 384 (2 * 4 * 6 * 8)