我想了一个循环语句定索引处获取某个列表中的项目。
(define decision-tree-learning
(lambda (examples attribs default)
(cond
[(empty? examples) default]
[(same-classification? examples) (caar examples)] ; returns the classification
[else (lambda ()
(let ((best (choose-attribute attributes examples))
(tree (make-tree best))
(m (majority-value examples))
(i 0)
(countdown (length best)) ; starts at lengths and will decrease by 1
(let loop()
(let example-sub ; here, totally stuck now
; more stuff
(set! countdown (- countdown 1))
; more stuff
)))))])))
在这种情况下, best
是列表,我需要在获得其价值countdown
指数。 你能帮助我吗?