X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment12.mdwn;h=1d135b477bafea0e213e2232023995293c19e415;hp=58068c4f8024545334766078a6d8fe05aa26c59d;hb=0584b327c9e6af370978c43c5ccf8142e05d662a;hpb=f2cc7617f047ea928629ebc8f880b54539da4e1c diff --git a/exercises/assignment12.mdwn b/exercises/assignment12.mdwn index 58068c4f..1d135b47 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,8 @@ 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)