Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Fibonacci-sequence/Scheme/fibonacci-sequence-4.ss
Normal file
10
Task/Fibonacci-sequence/Scheme/fibonacci-sequence-4.ss
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(define (fib)
|
||||
(define (nxt lv nv) (cons nv (lambda () (nxt nv (+ lv nv)))))
|
||||
(cons 0 (lambda () (nxt 0 1))))
|
||||
|
||||
;;; test...
|
||||
(define (show-stream-take n strm)
|
||||
(define (shw-nxt n strm) (begin (display (car strm))
|
||||
(if (> n 1) (begin (display " ") (shw-nxt (- n 1) ((cdr strm)))) (display ")"))))
|
||||
(begin (display "(") (shw-nxt n strm)))
|
||||
(show-stream-take 30 (fib))
|
||||
Loading…
Add table
Add a link
Reference in a new issue