Patents
US 7,937,694 B2#8366750 Most CitedExpiredUnited States (USPTO)Utility

Fast flattening of nested streams

12Forward Citations (#8366750 Global)
0.8/yrCitation Velocity (#9147121 Global)
2.40Citation PageRank (#10839492 Global)
5Prior Art Cited
1Claims (1 Indep. · 0 Dep.)
0Drawings / Sheets

Abstract

Techniques and tools are described for flattening nested streams. For example, a stream flattening tool processes nested streams on a stack to traverse the nested streams. The tool produces a flattened stream that enumerates the elements of the nested streams. In one embodiment, the tool initially pushes a stack frame onto the stack for a stream representing all of the nested streams. As the tool iterates across the “active” stream having the frame on the top of the stack, the tool may encounter and produce elements in the “active” stream. Or, the tool may encounter a nested stream and push a stack frame for the nested stream onto the stack, then continuing by iterating across the new active stream. The tool pops the stack frame for the active stream from the stack when the end of the stream is reached, or potentially earlier if handling a nested tail stream.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 12.

Claims (1 — 1 Independent, 0 Dependent)

  1. Claim 1Independent Claim

    A computer-readable storage medium storing computer-executable instructions for causing a computer system programmed thereby to perform a method comprising: receiving source code, wherein the source code comprises an iterator method for incrementally computing and yielding a sequence of values, the iterator method comprising a yield statement, the yield statement returning a recursive call to the iterator method; and compiling the source code, wherein: the compiling produces enumerator instructions for processing a plurality of nested streams on a stack to produce an unnested stream, the plura

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

Non-Patent Literature (5)

  • "Lazy evaluation," Wikipedia, 4 pages, Retrieved Mar. 24, 2009, from .
  • "Lazy evaluation," Wikipedia, 4 pages, Retrieved Mar. 24, 2009, from <http://en.wikipedia.org/wiki/Lazy—evaluation>.
  • "Standard streams," Wikipedia, 5 pages, Retrieved Mar. 24, 2009, from .
  • "Standard streams," Wikipedia, 5 pages, Retrieved Mar. 24, 2009, from <http://en.wikipedia.org/wiki/Standard—streams>.
  • "Stream (computing)0," Wikipedia, 1 page, Retrieved Mar. 24, 2009, from .