Jump to content

Module:Swap: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Fixed
Fixed
Line 3: Line 3:
function p.main(frame)
function p.main(frame)
x = frame.args[1]
x = frame.args[1]
y = frame.args[2]
y = frame.args[3]
sep = frame.args[2] or frame.args.sep
x,y = y,x
x,y = y,sep,x
return x,y
return x,y
end
end

Revision as of 20:50, 9 April 2025

local p = {}

function p.main(frame)
  x = frame.args[1]
  y = frame.args[3]
  sep = frame.args[2] or frame.args.sep
  x,y = y,sep,x
  return x,y
end
return p