<< Back to previous view

[CLJ-1004] ArrayChunk implements Seqable Created: 28/May/12  Updated: 25/Mar/13

Status: Open
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Jim Blomo Assignee: Jim Blomo
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File arraychunk-seq-10004.diff    
Patch: Code and Test


I've found it helpful to be able to iterate over ArrayChunks. Implementing Seqable means they can be used by most collections functions.

Comment by Jim Blomo [ 28/May/12 7:55 PM ]

2012-05-28 implements the seq method for vec and vector-of. It uses the array backing ArrayChunk to construct a sequence. Simple tests are included.

Comment by Stuart Halloway [ 01/Mar/13 9:44 AM ]

Please add discussion of motivating use cases.

Comment by Jim Blomo [ 25/Mar/13 11:10 PM ]

This was motivated by the desire to implement chunk-sequence-aware functions in Clojure elegantly. Currently, dealing with ArrayChunks in Clojure is clumsy because few of the functions dealing with collections will work with non-seqables. This functionality will mostly be used by implementers since end users shouldn't care if their sequence is chunked or not.

Generated at Wed Oct 18 04:27:18 CDT 2017 using JIRA 4.4#649-r158309.