It is disconcerting to realize that my intuition on how the cond() function works has been incorrect. I've always casually thought of it as roughly equivalent to if-then-else. Clearly that was poor intuition.
I wonder if
Code:
cond(x,a(z),b(z))
Code:
generate y = cond(x,a(z),b(z))
Code:
generate y = a(z) if x replace y = b(z) if !x
Code:
cond( x<100, a(z), cond( x<1000, b(z), c(z) ) )
Leave a comment: