5 lines
145 B
Text
5 lines
145 B
Text
|
|
# Set-intersection: A ∩ B
|
||
|
|
def stringset_intersection(A;B):
|
||
|
|
reduce (A|keys)[] as $k
|
||
|
|
({}; if (B|has($k)) then . + {($k):true} else . end);
|