--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tweak as needed:(keep-indexed(fn [i v](if (= 0 (mod i 5))nilv))(range 30))
On Tue, Feb 17, 2015 at 12:21 PM, Cecil Westerhof <cldwes...@gmail.com> wrote:What is the best way to remove all elements which position (counting from 1) is a multiply of five out of a list?So the list:
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21)becomes:
(1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21)
Style police would point out zero? and when-not :).
--
+1
And don't forget Eastwood as well :).
On a more serious note, I found http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/ has some other great tips related to this.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
why not (mapcat next)?
--
Then probably (apply concat) is better than (mapcat identity) isnt it?What is (cons ::sentinel)? Why do you need it here?
--