Template:Uniq

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{#lua:
 
{{#lua:
   S = {};
+
   seen = {};
 
   for str in stdin:gmatch("([%w]+)")
 
   for str in stdin:gmatch("([%w]+)")
     do S[str]=str; end
+
     do if not seen[str] then print(str .. " "); seen[str] = true; end
  print(table.concat(S, " "));
+
 
|{{{1}}}}}
 
|{{{1}}}}}

Revision as of 13:48, 24 January 2009

./lua: /tmp/mw_ex_lua_LOnYzc:3: 'end' expected (to close 'for' at line 2) near '<eof>'

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox