learning-sicp

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

exercise-6.scm (391B)


      1 (import (srfi :64))
      2 (import (sicp solutions chapter-3 exercise-6))
      3 
      4 (rand 'reset 0)
      5 
      6 (define random-sequence-a
      7   (map
      8    (lambda (x) (rand 'generate))
      9    (iota 10)))
     10 
     11 (rand 'reset 0)
     12 
     13 (define random-sequence-b
     14   (map
     15    (lambda (x) (rand 'generate))
     16    (iota 10)))
     17 
     18 (test-begin "chapter-3-exercise-6")
     19 (test-equal
     20     random-sequence-a
     21   random-sequence-b)
     22 (test-end "chapter-3-exercise-6")