Skip to content

Commit

Permalink
Helper functions to simplify testing
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt committed Dec 10, 2024
1 parent c661c7d commit 5b52498
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...))

0 comments on commit 5b52498

Please sign in to comment.