Files
lo/docs/data/it-productby.md
T
2025-10-08 14:55:05 +02:00

577 B

name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
name slug sourceRef category subCategory signatures playUrl variantHelpers similarHelpers position
ProductBy productby it/math.go#L90 it math
func ProductBy[T any, R constraints.Float | constraints.Integer | constraints.Complex](collection iter.Seq[T], transform func(item T) R) R
it#math#product
core#slice#productby
core#slice#product
67

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

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