the difference between if and cond?
i'm learning sicp now and do the ex2.23
i have wrirten the following code:

    (define (for-each proc items)
       (if (null? items)
           #t
           ((proc (car items))
            (for-each proc (cdr items)))))

but when running, cause error: **procedure application: expected procedure, given: #<void>; arguments were: ()**

i think i know the reason: I call the for-each function recursively, every called for-each wanted to return value

but when i have modified the code:

    (define (for-each proc items)
      (cond ((null? items) #t)
            (else (proc (car items)) (for-each proc (cdr items)))))

it runs well. I don't understand, why? in **cond**, does every called for-each no need to return value?

i used DrScheme, and choose language [SICP](http://www.neilvandyke.org/sicp-plt/)

i'm not a native speaker of english, so if there is sth which isn't described clearly, pls tell me
the difference between if and cond?
===

i'm learning sicp now and do the ex2.23
i have wrirten the following code:

    (define (for-each proc items)
       (if (null? items)
           #t
           ((proc (car items))
            (for-each proc (cdr items)))))

but when running, cause error: **procedure application: expected procedure, given: #<void>; arguments were: ()**

i think i know the reason: I call the for-each function recursively, every called for-each wanted to return value

but when i have modified the code:

    (define (for-each proc items)
      (cond ((null? items) #t)
            (else (proc (car items)) (for-each proc (cdr items)))))

it runs well. I don't understand, why? in **cond**, does every called for-each no need to return value?

i used DrScheme, and choose language [SICP](http://www.neilvandyke.org/sicp-plt/)

i'm not a native speaker of english, so if there is sth which isn't described clearly, pls tell me