<Varargs with maps?> Is there a way to have someth...
# forum
r
Varargs with maps? Is there a way to have something like Python’s **kwargs? This is the syntax I want to use: fun makeTag(tagName: String, /* vararg props: ??? */): Elem; makeTag("p", style = "color: red") This is the alternative I’m using, but it doesn’t look as clean. fun makeTag(tagName: String, vararg props: Pair): Elem; makeTag("p", "style" to "color: red") I’d prefer being able to use the first syntax because it, in my opinion, appears cleaner. No attempted searches have been remotely useful, both of...