If I use the following code from chapter 1 of SICP it gives the correct answer.
(cond ((= a 4) 6) ((= b 4) (+ 6 7 a)) (else 25))
prints 16
If I replace the cond by an if it doesn't work
(if ((= a 4)6) ((= b 4) (+ 6 7 a)) (else 25))
gives error:
The object #f is not applicable.
What am I doing wrong? Why doesn't the if work?
N.B. This is from exercise 1.1 with the definitions:
(define a 3)
(define b (+ a 1))