case design

For the Compleat Fan

case design

Postby ssqq » Mon Aug 22, 2016 2:12 pm

Code: Select all
(constant 'Type 1)

(define (check-type x)
  (case
    (Type (println "it is Type"))
    (true (println "it is not Type"))))

(check-name 1)

(exit)

==> it is not Type

For: case
syntax: (case exp-switch (exp-1 body-1) [(exp-2 body-2) ... ])

The result of evaluating exp-switch is compared to each of the unevaluated expressions exp-1, exp-2,

I want to know Why make case expression with unevaluated?
ssqq
 
Posts: 88
Joined: Sun May 04, 2014 12:49 pm

Return to Anything else we might add?

Who is online

Users browsing this forum: No registered users and 4 guests

cron