with Kotlin"} } body { h1 {+"Typesafe builders with Kotlin"} p {+"this format can be used as an alternative markup to XML"} } } fun html(init: HTML.() -> Unit): HTML { val html = HTML() html.init() return html }
with Kotlin"} } body { h1 {+"Typesafe builders with Kotlin"} p {+"this format can be used as an alternative markup to XML"} } } fun html(init: HTML.() -> Unit): HTML { val html = HTML() html.init() return html } Extension function fun html(init: HTML.() -> Unit): HTML {
with Kotlin"} } body { h1 {+"Typesafe builders with Kotlin"} p {+"this format can be used as an alternative markup to XML"} } } fun html(init: HTML.() -> Unit): HTML { val html = HTML() html.init() return html } fun html(init: HTML.() -> Unit): HTML {
with Kotlin"} } body { h1 {+"Typesafe builders with Kotlin"} p {+"this format can be used as an alternative markup to XML"} } } fun html(init: HTML.() -> Unit): HTML { val html = HTML() html.init() return html } fun html(init: HTML.() -> Unit): HTML { Funktionen der Klasse HTML
HTML() html.init() return html } fun html(init: HTML.() -> Unit): HTML { fun createHtml() = html { head { title {+"Typesafe builders with Kotlin"} } body { h1 {+"Typesafe builders with Kotlin"} p {+"this format can be used as an alternative markup to XML"} } }