Anonymous user
Unique characters: Difference between revisions
→{{header|Lua}}
Line 945:
unpack = unpack or table.unpack -- compatibility for all Lua versions
for i, str in ipairs (strings) do
▲ local map = {}
for i=1, string.len(str) do
local char = string.sub(str,i,i)
Line 955 ⟶ 956:
end
end
for char, bool in pairs (map) do▼
if bool then▼
▲ end
end
end
▲ table.sort (list)
{{out}}<pre>1 5 6 b g s t z</pre>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
|