The basic stream implementation that you will need is provided in file streams.scm. Both empty-stream? and stream-null? are defined and are just different names for the same procedure.
Procedure stream-merge returns a stream. Do not modify any stream utilities, or create any new versions of them.
To facilite testing, four streams are already defined for you. Streams fstream1 and fstream2 are two short arbitrary streams of increasing integers. Stream lstream1 is a long stream of even integers, and stream lstream2 is a long stream of integers that are divisible by 3. The procedure stream-display has been defined to show the first n numbers in the stream, where n is the second argument of the procedure. If your stream-merge procedure is defined properly, you should get the following results:
> (stream-display (stream-merge fstream1 fstream2) 20) 1 1 2 3 3 4 5 5 5 6 7 7 8 > (stream-display (stream-merge lstream1 lstream2) 20) 0 0 2 3 4 6 6 8 9 10 12 12 14 15 16 18 18 20 21 22Don't forget to make sure that your stream-merge procedure works properly when one or both of its arguments is the-empty-stream.
As usual, turn in the macro definition of cons-stream followed by your definition of stream-merge in the body of the code you submit to the Automated Tester.