基本上有一对由两个函数组成,代码必须采用对输入x
来找到最高评估x
并打印该评估。
我收到错误:
汽车:合同违约预期:对?给定:4
define (max x)
(lambda (x) ;I wanted lambda to be the highest suitable function
(if (> (car x) (cdr x))
(car x)
(cdr x))))
(define one-function (lambda (x) (+ x 1)))
(define second-function (lambda (x) (+ (* 2 x) 1))) ;my two functions
((max (cons one-function second-function)) 4)