Alowaniak
08/27/2018, 3:33 PMtypealias Block = ()->Unit
inline fun unless(p: Boolean, b: Block) { if(!p) b() }
//and then I can use it within a function to breakout as
unless (false) { return }
// but I would like something like
{ return } unless (false)
// I tried doing
inline infix fun Block.unless(p: Boolean) { if(!p) this() }
// But then when using it as `{ return } unless (false)` it will say 'return' is not allowed here because the lambda is not inlined I'm guessing