Template:Enzyme/Uniq
From Metabolomics.JP
< Template:Enzyme(Difference between revisions)
(New page: {{#lua: seen = {}; S = {}; for str in stdin:gmatch("([%w]+)") do if not seen[str] then table.insert(S); seen[str] = true; end end print( table.concat(S, " + ") ); |{{{1}}}}}) |
|||
(7 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
{{#lua: | {{#lua: | ||
− | seen = {}; S = {}; | + | local seen = {}; |
− | for str in stdin:gmatch("([%w]+)") | + | local S = {}; |
− | do if not seen[str] then table.insert(S); seen[str] = true; end | + | for str in stdin:gmatch("([%w-]+)") |
+ | do if not seen[str] then table.insert(S, str); seen[str] = true; end | ||
end | end | ||
− | print( table.concat(S, " + ") ); | + | print( table.concat(S, " + ") ); |
|{{{1}}}}} | |{{{1}}}}} |
Latest revision as of 16:14, 19 February 2009
1