在元圆计算器中添加基元

问题描述 投票:0回答:1

我正在研究元循环评估器,并且正在尝试添加原始过程。除了不确定如何添加错误外,我几乎完成了。这是我到目前为止的内容:

(define primitive-procedures
  (list (list 'car car)
        (list 'cdr cdr)
        (list 'cons cons)
        (list 'null? null?)
        (list '+ +)
        (list '* *)
        (list '- -)
        (list '/ /)
        (list '< <)
        (list '<= <=)
        (list '= =)
        (list '>= >=)
        (list '> >)))

到目前为止有效。我尝试添加(list '(error) (error "Metacircular Interpreter Aborted"))以获取错误,但显然不起作用...我该怎么做?

谢谢!

scheme racket evaluator metacircular
1个回答
0
投票
(list 'error error)
© www.soinside.com 2019 - 2024. All rights reserved.