diff --git a/src/utils.jl b/src/utils.jl index 140086f6e..2a651605b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -235,3 +235,10 @@ end Equivalent to `vec(collect(Iterators.product(xs...)))`. """ flat_product(xs...) = vec(collect(Iterators.product(xs...))) + +""" + map_prod(f, xs...) + +Equivalent to `map(f, flat_product(xs...))`. +""" +map_prod(f, xs...) = map(f, flat_product(xs...))