Hi<br><br>I'm working through The Little Schemer and I've comed to the point where they introduce types (page 181). They use terms like:<br><br>*const<br>*quote<br>*identifier<br>*lambda<br>*cond<br><br>but I wonder how I type these names in DrScheme? When I try to implement the atom-to-action function (see below) DrScheme says this: "*const: name is not defined, not a parameter, and not a primitive name"<br>
<br>this is the function:<br><br>(define atom-to-action<br> (lambda (e)<br> (cond<br> ((number? e) *const)<br> ((eq? e #t) *const)<br> ((eq? e #f) *const)<br> ((eq? e '(cons)) *const)<br> ((eq? e '(car)) *const)<br>
((eq? e '(cdr)) *const)<br> ((eq? e '(null?)) *const)<br> ((eq? e '(eq?)) *const)<br> ((eq? e '(atom?)) *const)<br> ((eq? e '(zero?)) *const)<br> ((eq? e '(add1)) *const)<br>
((eq? e '(sub1)) *const)<br> ((eq? e '(number?)) *const)<br> (else *identifier))))<br><br clear="all">kind regards Jon Loldrup, Denmark<br>