On Sat, 12 Jan 2019 at 21:12 -0800, Hassan Shahin wrote:
> When I apply the procedure to 'John it will evaluate to 'symbol. The idea 
> of the procedure is to check the "type" of the given item, which is not 
> decided aprior. If I give it 'John I know it is a symbol.
> May be my question should be formulated as this: Since John is not a pair, 
> an empty-list, a number, not a symbol, why the execution doesn't proceed to 
> the else expression no matter what John is, unless you are telling me that
> the item given to the procedure is evaluated first.

Perhaps you meant to define John before:

(define John '(1 2 3))
(type-of John) => 'pair

Since type-of is a procedure, this means that when it is applied, it's
arguments will be evaluated during application. Evaluating a symbol
which is not defined will result in an error.

-- 
Jack M. Rosenthal
http://jack.rosenth.al

A virtual filesystem? I don't know what you are trying to achieve,
but there's probably a better way.
    -- Me

-- 
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.

Attachment: signature.asc
Description: PGP signature

Reply via email to