Changeset 20582 in project


Ignore:
Timestamp:
09/30/10 23:18:17 (11 years ago)
Author:
Kon Lovett
Message:

Fixed example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/F-operator

    r20581 r20582  
    331331
    332332<enscript language=scheme>
    333 (use shift-reset)
    334 (use srfi-41)
    335 (use srfi-45)
    336 
    337 (define (list->stream list)
     333(use shift-reset srfi-41 srfi-45)
     334
     335(define (my-list->stream list)
    338336  (iteration-procedure->stream
    339337   (lambda (receiver)
     
    341339
    342340(define (iteration-procedure->stream iteration-procedure)
    343   (lazy
    344    (reset
    345     (begin
    346       (iteration-procedure
    347        (lambda (element)
    348          (shift continue-iteration
    349            (stream-cons element (lazy (continue-iteration))))))
    350       stream-nil))))
     341  (reset
     342    (iteration-procedure
     343     (lambda (element)
     344       (shift continue-iteration
     345         (stream-cons element (lazy (continue-iteration (void)))))))
     346    stream-null))
    351347</enscript>
    352348
Note: See TracChangeset for help on using the changeset viewer.