私はまだSchemeに不慣れで、call/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))))))