Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

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

4 Answers

0 votes
by

Comment made by: jim.blomo

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.

0 votes
by

Comment made by: stu

Please add discussion of motivating use cases.

0 votes
by

Comment made by: jim.blomo

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.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-1004 (reported by jim.blomo)
...