Question How to create streams recursively? 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project Step #3, deadline Monday 18 November (Mike O'Donnell)
Date: 2002, Nov 18
From: Ivan Beschastnikh <ivan@uchicago.edu>

I'm trying to build a stream without using the common
definition of the form:

(define <stream-name> (cons-stream val1 (cons-stream val2 ...
(cons stream valN <stream-name>)))))).....)

I'm having trouble referencing the actual stream at the end
of values list.

This all leads up to the function rational->xreal which
builds a stream recursing trough the rational ....

How do you create such a stream without the regular
definition? 

I think this may also be a mroe generalized problem:
Given a finite list of values val1, ..., valN
How do you create a stream to contain an infinitely
repeating sequence of such values in the exact order they are
given in the list.


Messages

1. Feedback You may specify any length of head to a stream, then repeat by Mike O'Donnell, 2002, Nov 19

to: "How to create streams recursively?"