I have this definition for a procedure:

(define type-of (lambda (item)
                         (cond
                           [(pair? item) 'pair]
                           [(null? item) 'empty-list]
                           [(number? item) 'number]
                           [(symbol? item) 'symbol]
                           [else 'some-other-type])))

My understanding is that if the first 4 conditions fail (=> #f 
<https://plus.google.com/s/%23f/posts>), then the last expression (the else 
expression) is evaluated. 
When I apply this procedure to John, as in (type-of John) I get an error 
(; john: undefined; ; cannot reference an identifier before its definition)
. 

What is going on?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to