ArrayChunk implements Seqable

Description

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

Environment

None

Attachments

1

Activity

Show:

Jim BlomoMarch 26, 2013 at 5:10 AM

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.

Stuart HallowayMarch 1, 2013 at 3:44 PM

Please add discussion of motivating use cases.

Jim BlomoMay 29, 2012 at 1:55 AM

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.

Details

Assignee

Reporter

Patch

Code and Test

Priority

Created May 29, 2012 at 12:53 AM
Updated March 26, 2013 at 5:10 AM