Unique characters in each string: Difference between revisions

Line 735:
found 6 unique common characters: 123abc
</pre>
 
=={{header|Picat}}==
<lang Picat>import ordset.
 
main =>
L = ["1a3c52debeffd", "2b6178c97a938stf", "3ycxdb1fgxa2yz"],
U = [new_ordset([C : C = 1 in counts(S)]) : S in L],
println(fold(intersection,U.first,U.tail)).
 
% Return a map of occurrences of each element in the list L
counts(L) = Map =>
Map = new_map(),
foreach(E in L)
Map.put(E,Map.get(E,0)+1)
end.</lang>
 
{{out}}
<pre>123abc</pre>
 
=={{header|PicoLisp}}==
495

edits