shouldn't both return ()?
> (if true '() '())
()
> (if nil '() '())
nil
'if' can take multiple condition/action pairs similar o 'cond' but wihtout the parenthesis, so it take the last '() as a condition and evaluates it. As it evluates to logigal nil it returns nil.
I agree that this very un-intuitive, and will change the behaviour for both 'if' and 'cond', so in the future:
(if nil '() '()) => () ; previously nil
and
(cond (nil 1) (nil 2) ('())) => () ; previously nil
Lutz