Does Racket use memoization when computing large amounts of numbers from an infinite stream? So, for example, if I printed out (aka, computed and displayed) the first 400 nu
For other Scheme implementations that use SRFI 41 streams, those streams also fully memoise all the materialised elements.
In fact, in my Guile port of SRFI 41 (which has been in Guile since 2.0.9), the default printer for streams will print out all the elements so materialised (and nothing that isn't):
scheme@(guile-user)> ,use (srfi srfi-41)
scheme@(guile-user)> (define str (stream-from 0))
scheme@(guile-user)> (stream-ref str 4)
$1 = 4
scheme@(guile-user)> str
$2 = #
Any of the elements that aren't being printed out as ? or ... have already been memoised and won't be recomputed. (If you're curious about how to implement such a printer, here's the Guile version.)