learning-sicp

My embarrassing half assed SICP run.
git clone https://kaka.farm/~git/learning-sicp
Log | Files | Refs

exercise-42.scm (553B)


      1 (define-library (sicp tests chapter-2 exercise-42)
      2   (import (scheme base)
      3           (srfi :64)
      4           (sicp utils)
      5           (sicp solutions chapter-2 exercise-42))
      6 
      7   (begin
      8     (test-begin "chapter-2-exercise-42")
      9     (test-equal
     10         #f
     11       (safe? 2
     12              (list (make-position 1 2)
     13                    (make-position 2 1))))
     14     (test-equal
     15         #t
     16       (safe? 2
     17              (list (make-position 4 2)
     18                    (make-position 2 1))))
     19     (test-equal
     20         '()
     21       (queens 8))
     22     (test-end "chapter-2-exercise-42")))