I have the following infix fun
infix fun <T> Boolean.then(lazyValue: () -> T): T?
= if (this) lazyValue() else null
with following use case
(index > 0) then { data[index - 1].id }
I want to rewrite it as
index > 0 then { data[index - 1].id }
and avoid parentheses around index > 0. Currently it does not resolve in code. Is there any way to make it work?