Board Thread:Lua Help/@comment-24520859-20160103085441/@comment-166269-20160103095741

just tells the parser to output whatever's been passed to the first unnamed parameter, and if there's nothing, to output whatever's been passed to the second unnamed parameter; if that's empty too, it doesn't output anything. (Nesting the parameters like this instead of using  (e.g.  ) does mean that if the first parameter is defined but empty, and the second parameter is defined and nonempty, nothing will be output (e.g. if this code were in Template:Foo, and the template was called with , nothing would be output, but if it was called with  , the string "something" would be output); this behavior can be accounted for if it's actually required, but ignoring it will simplify the Lua version.)

To convert this to a module, let's say you've saved the parameters passed to the  in a variable named   (e.g. via   or similar), and you want to save the result to   (for further processing or whatever). Then you would do.

My explanations here may not have been worded as clearly as they could have been, so if I've confused you on anything, or just didn't explain something well enough, let me know where I lost you and I'll try to explain it better. =)