learning-sicp

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

exercise-13.scm (437B)


      1 (define-library (sicp tests chapter-3 exercise-13)
      2   (import (scheme base)
      3           (only (srfi :1) last-pair)
      4           (srfi :64)
      5           (only (sicp solutions chapter-3 exercise-13) make-cycle))
      6 
      7   (begin
      8     (define z (make-cycle (list 'a 'b 'c)))
      9 
     10     (test-begin "chapter-3-exercise-13")
     11     (test-error (last-pair z)) ; Guile's last-pair checks for and raises an error on cyclic lists.
     12     (test-end "chapter-3-exercise-13")))