【发布时间】:2016-03-04 12:28:32
【问题描述】:
图。 《如何设计程序》中的65如下:
; Nelon -> Number
; determines the smallest number on l
(define (inf l)
(cond
[(empty? (rest l)) (first l)]
[else
(local ((define smallest-in-rest (inf (rest l))))
(cond
[(< (first l) smallest-in-rest) (first l)]
[else smallest-in-rest]))]))
有人能解释一下最小静态变量是如何工作的吗?我在函数中得到递归,但变量让我感到困惑
【问题讨论】: