How i can make a shortcut for `lazy`: ``` val __na...
# announcements
q
How i can make a shortcut for `lazy`:
Copy code
val __name: String by lazy {
     createHTML().small {
         +name
     }
}
like as my own delegate builder `html`:
Copy code
val __name: String by html {
    small {
        +name
    }
}
o
what do you mean by a shortcut?
q
i mean just a shortest code length. Wraper
o
what’s wrong with
fun html(…) = lazy {…}
q
coze i don't know how to call
init
extension lambda, directly on
createHTML
function. I have only this:
Copy code
fun html(init: FlowContent.() -> Unit) = lazy { createHTML().div { init() } }
I know, return type of
createHTML()
is not
FlowContent
thats all my html content declared into
html
builder, wraped by
div
🙂... Try to find right way
o
.apply(init)
?
or, for
div
, just pass it directly to the
div
function