@resultBuilder
を使った HTML のテンプレートエンジン的なものがあれば使いやすかったりするでしょうか?目的が違うから微妙?でも API が似てたら両方を触りやすい気も。 (edited)div(id: "foos") { for foo in foos { img(src: "img/\(foo.id).png", alt: "foo") } }
tag("img", ["src": "img/foo.png", "alt": "foo"])
みたいに逃げられる。 (edited)