Scheme (Racket) newbie here.
I am reading this book: Programming Languages Application and Interpretation by Shriram Krishnamurthi.
I installed the plai package.
The book has this define-type on page 6:
(define-type AE
[num (n number?)]
[add (lhs AE?)(rhs AE?)]
[sub (lhs AE?)(rhs AE?)])
And this define on page 8:
(define (parse sexp)
(cond
[(number? sexp) (num sexp)]
[(list? sexp)
(case (first sexp)
[(+)(add (parse(second sexp))
(parse(third sexp)))]
[(-)(sub (parse(second sexp))
(parse(third sexp)))])]))
I tested parse:
(parse (read))
3
--> (num 3)
The book says that I can replace (read) with an expression preceded by a backtick, so I typed backtick followed by 3:
(parse )
--> (num 3)
The correct result was obtained, but as soon as I typed backtick the expression (and the backtick) suddenly became invisible (i.e., not displayed on the command line screen). Why is that? How do I get the command line to display the backtick and the expression? I'd like to be able to see what I typed.