Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
10
Task/Fibonacci-sequence/Scheme/fibonacci-sequence-4.scm
Normal file
10
Task/Fibonacci-sequence/Scheme/fibonacci-sequence-4.scm
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