LispEx
LispEx copied to clipboard
scheme代码中含有;注释行的时候会陷入死循环
(define (func x)
(if (and
(or
(and (> x 10) (< x 20))
(and (< x -10) (> x -20))
)
(and (not (= x 15)) (not (= x -15)))
)
10000
-10000
)
)
;Value: func
(func 11)
;Value: 10000
(func 20)
;Value: -10000
(func -11)
;Value: 10000
(func 15)
;Value: -10000
(func -15)
;Value: -10000
以上代码带注释的时候无法执行,去掉所有注释之后就正常了。