Single-line if x = [a: ["c","d"], b: ["e","f"]] or x = [a: "b", c: "d"] :
[x*.key, x*.value].transpose()*.combinations().transpose()*.flatten()*.toSpreadMap()
How it works:
First separate the keys and values:
[x*.key, x*.value] = [[a, b], [[c, d], [e, f]]]
Import them to pair keys and values:
[[a, b], [[c, d], [e, f]]].transpose() = [[a, [c, d]], [b, [e, f]]]
Use combinations to pair the key with your values (the distribution operator used here to apply it to each item in the list). Please note that combinations will work correctly with both [a:b] and [a:[b,c]] :
[[a, [c, d]], [b, [e, f]]]*.combinations() = [[[a, c], [a, d]], [[b, e], [b, f]]]
Move the lists so that we end up with abab instead of aabb (albeit somewhat nested):
[[[a, c], [a, d]], [[b, e], [b, f]]].transpose() = [[[a, c], [b, e]], [[a, d], [b, f]]]
Smooth nested lists (using markup again to smooth nested lists, but not the entire list):
[[[a, c], [b, e]], [[a, d], [b, f]]]*.flatten() = [[a, c, b, e], [a, d, b, f]]
Spread toSpreadMap to convert this list to a list of maps.
[[a, c, b, e], [a, d, b, f]]*.toSpreadMap() = [*:[b:e, a:c], *:[b:f, a:d]]