Skip to content
Discussion options

You must be logged in to vote

You're right, cross can't do a simple cross product without matching, which seems odd since it's literally named cross 😅

While we could change cross to do a simple cross product when by is not given, Paolo probably won't accept it because it could break existing pipelines. Maybe we can do it if you explicitly say by: null ?

Anyway, for now I recommend you use combine and then map to un-flatten the combos:

ch_a.combine(ch_b)
    .map { a, b, c, d -> [ [a, b], [c, d] ] }

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@bentsherman
Comment options

Answer selected by idot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants