stream-unfoldn

[procedure] stream-unfoldn generator seed n

SRFI-40: Returns n streams whose contents are produced by successive calls to generator, which takes the current seed as an arguments and returns n + 1 values.

(proc seed) -> seed result_0 ... result_N 

Here, result_i indicates how to produce the next element of the i-th result stream:

  • (value) : value is the next car of this result stream
  • #f : no new information for this result stream
  • () : the end of this result stream has been reached