0
我還是新來的計劃,並試圖通過呼叫/ cc和amb運算符來解決幻方。目前,它正在打印:幻方正在計劃中
1 1 1 31 Row 1
16 16 1 1 Row 2
16 1 16 1 Row 3
1 16 16 1 Row 4
我不明白爲什麼它只使用這些數字。這是我的獨特之處嗎?程序?這裏是我的代碼:
;; check whether an element of one given list is a member of any
;; of the other given lists
(define distinct?
(lambda (o l)
(if (null? l)
#t
(if (= (car l) o)
'()
(distinct? o (cdr l))))))