about summary refs log tree commit diff stats
path: root/html/encoding.png
Commit message (Collapse)AuthorAgeFilesLines
* 5485 - promote SubX to top-levelKartik Agaram2019-07-271-0/+0
2023-08-23 07:52:19 -0400 committer elioat <elioat@tilde.institute> 2023-08-23 07:52:19 -0400 *' href='/elioat/tour/commit/js/games/nluqo.github.io/~bh/61a-pages/Lectures/3.5/fib.scm?id=562a9a52d599d9a05f871404050968a5fd282640'>562a9a5 ^
1
2
3
4
5
6
7
8
9
10
11
12











                                                                     
(define (add-streams s1 s2)(cond((stream-null? s1)s2)
				((stream-null? s2)s1)
				(else (cons-stream (+ (stream-car s1)
						(stream-car s2))
					     (add-streams
					      (stream-cdr s1)
					      (stream-cdr s2))))))

(define fibs (cons-stream 0
			  (cons-stream 1
				       (add-streams (stream-cdr fibs)
						    fibs))))