bartavelle / language-puppet

A library to work with Puppet manifests, test them and eventually replace everything ruby.
BSD 3-Clause "New" or "Revised" License
51 stars 8 forks source link

flatten lists using stdlib :: concat #167

Closed jfroche closed 8 years ago

jfroche commented 8 years ago

Concat enable to flatten multiple lists. The current implementation seems to support this use case (two element, last element is a string) only:

concat(['1','2','3'],'4')

but not this usecase (n element, strings or lists):

concat(['1','2','3'],'4',['5','6','7'])

https://github.com/puppetlabs/puppetlabs-stdlib#concat ruby implementation: https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/concat.rb