Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support 'adding' arrays as concat? #213

Open
eddieparker opened this issue Jan 2, 2020 · 1 comment
Open

Feature Request: Support 'adding' arrays as concat? #213

eddieparker opened this issue Jan 2, 2020 · 1 comment

Comments

@eddieparker
Copy link

It would be nice to be able to 'add' arrays to concat them versus using the array.concat function, which is very verbose. Or at least a way to add the functionality if the caller so desires the shortened syntax.

@binarycow
Copy link
Contributor

binarycow commented May 7, 2021

This seems to already work.

This template:

{{
a = [ 'a', 'b', 'c' ]
b = [ 'd', 'e', 'f' ]

c = a + b

for item in c
  item + '\n'
end

}}

Generates this output:

a
b
c
d
e
f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants