Hello, I'm considering using KSP to make copies of...
# ksp
i
Hello, I'm considering using KSP to make copies of functions where if expressions/statements are replaced with function calls. For example, given
fun f() { if(rand() > 1) println("a") else println("b") }
, I'd like to make a copy with the if replaced:
fun f_copy() { ifFunction(cond ={ rand() > 1}, b1 = { println("a") }, b2={ println("b") }) }
. Would KSP be able to do this?
🚫 3
t
Unfortunately, no. KSP doesn't expose expression level information.
🙏 1
😢 1