hey. where can i read how does this works: ? ```ko...
# getting-started
m
hey. where can i read how does this works: ?
Copy code
kotlin
InputDecoration(color=if(isValid) blue else red) {
    Input(value, onChange)
  }
I mean the block after the function call.
r
I guess you mean a general idea on the language feature? (and no something specific to the library)
m
yes
j
r
m
thank you
r
But TL;DR: if functions accepts lamba as last argument, then you can write:
Copy code
func(args) { parameters -> TODO!() }
instead of equivalent code of:
Copy code
func(args, { parameters -> TODO!() })
👍 2
👍🏾 1
b
afaict this feature was added to the language to be able to define functions that look like control structures for the reader