Use if instead of cond for factorial.