Effect CommunityEC
Effect Community3y ago
9 replies
bigpopakap

Creating tuples from two arrays

Hello hello! I think this should be really easy, but I'm failing to find/remember the right function for this:

// I have
array1 = ["a", "b"];
array2 = [1, 2];

// I want
[["a", 1], ["a", 2], ["b", 1], ["b", 2]]
// where the order of the tuples doesn't matter to me


I know zip is not the right function... but what is?
Was this page helpful?