You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Clojure
I want to implement ISeq to provide a sequence over an Excel file. I
plan to implement it in Java. I see that Range extends ASeq for its
default implementation of cons() and more(). Is extending ASeq the
recommended way to implement a sequence?
Meikel Brandmeyer
unread,
Jul 26, 2009, 5:14:01 PM7/26/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clo...@googlegroups.com
Hi,
Yes. The recommended way to implement a seq is to extend ASeq and implement first() and more(). (The other methods are optional, but it might be interesting to exploit some structure of your data to provide faster versions. YMMV)
Sincerely Meikel
Garth Sheldon-Coulson
unread,
Jul 26, 2009, 9:54:29 PM7/26/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clo...@googlegroups.com
When I asked the same question a few weeks ago, Rich Hickey gave this response:
Looking at StringSeq, as he suggested, was particularly helpful. I found useful the idea of using an integer counter to represent the current location in the data structure.