Module:List

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

local p = {}

function p.main(frame) -- transforms args from metatable to a regular table (necessary to use table functions) local args = table.merge({}, frame:getParent.args) return p._main(args) end

function p._main(args) local delimiter = args.delim and mw.text.decode(args.delim) or ' ' local args = fp.map(mw.text.trim, args) return table.concat(args, delimiter) end

return p