Version 4, last updated by stuart.halloway at March 29, 2011 16:26 UTC

Read this first!

Clojure issue tracking now lives at http://dev.clojure.org/jira, and the wiki is at http://dev.clojure.org. These Assembla pages are kept online for historical interest only.

Chunked Seqs

 

Leveraging the structure of data when sequencing

Scenario

  • Viewing all data structures as sequences is powerful 
  • High-level sequence model is ideal for code understanding (vs. loops) 
  • Laziness is critical, esp. not realizing full intermediate results 
  • But 
    • Per-step overhead 
    • Fails to leverage efficiencies of representation

Idea 

  • first/rest imply item-at-a-time steps 
    • But nothing about map et al does 
  • Introduce coarser-granularity seqs 
    • could leverage block-like indexed addressability of representations 
  • Backwards compatible with item-at-a-time seqs 
  • Should be faster - amortize overhead