Module:List

local table = require('Module:Std/table') local fp = require('Module:Std/functional') local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.main(frame) return p._main(getArgs(frame)) end

function p._main(args) local items = fp.map(mw.text.trim, args) if table.size(items) == 0 then return args.default end if args.delim == 'prosaic' then return mw.text.listToText(items) else local delim = (args.delim and args.delim:match("^'(.*)'$") or args.delim) or ' ' return table.concat(items, mw.text.decode(delim)) end end

return p