niml
niml copied to clipboard
Are loops possible inline in niml?
sorry if this is a silly question im kind new to nim but is it possible to do for loops in niml? im trying to create a select with a for loop to create the options 😓
return niml:
select:
(for i, key in keylist:
option:
key.name)
No but I can add a special syntax for them. Thing is, I haven't touched this for a long time so I will have to review the code. Otherwise if you want to repeat elements you can nest the niml macro and do a join on the string for now.
@jakubDoka no worries
Otherwise if you want to repeat elements you can nest the niml macro and do a join on the string for now.
yeah i ended up doing this which is ok for me usecase