X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment12.mdwn;h=02a78ac75330f1b8a074c38d65b2200a5958527e;hp=58068c4f8024545334766078a6d8fe05aa26c59d;hb=9047a6298be9a3fb3bf95a76543d6c70af68c18b;hpb=aa05135baa77e4166acadc8f1a22935271a377b9 diff --git a/exercises/assignment12.mdwn b/exercises/assignment12.mdwn index 58068c4f..02a78ac7 100644 --- a/exercises/assignment12.mdwn +++ b/exercises/assignment12.mdwn @@ -290,6 +290,7 @@ Here are the beginnings of functions to move from one focused tree to another: # next2 ();; - : int option = None + ## Same-fringe using streams ## Now we'll describe a different way to create "the little subprograms" that we built above with `make_fringe_enumerator`. This code will make use of a data structure called a "stream". A stream is like a list in that it wraps a series of elements of a single type. It differs from a list in that the tail of the series is left uncomputed until needed. We turn the stream off and on by thunking it, nad by forcing the thunk. @@ -364,6 +365,7 @@ Some other Scheme details or reminders: + 4. Here is the Scheme code handling the same-fringe problem. You should fill in the blanks: (define (lazy-flatten tree)