is a closure being passed to the 'install' functio...
# ktor
w
is a closure being passed to the 'install' function?
The main idea is that when a the last parameter of a kotlin function is a callback/lambda/closure, you can put curly brackets outside
Copy code
install(Routing, {
  get("/") {
    call.respondText("Hello, World!")
  }
})
👍 1
It is equivalent to this, but with a cleaner syntax, since you don’t have to put the
)
after the
}
and do not have a
,
at all.
w
That clarifies it perfectly. Thanks a lot!
👍 1