On Fri, Feb 24, 2012 at 2:17 PM, JuanManuel Gimeno Illa <jmgim...@gmail.com> wrote: > What I don't understand of your solution is the (map seq (step pieces)) > because for me it is clear that each of the sequences generated by step is a > seq, so why do you need to seq it?
It's the combination of (remove nil? (map seq ...)) that gets rid of the empty seqs in cases like (split-at-subsequence [3 4] [1 2 3 4 3 4 5 6]). I don't know if it's any more efficient than (remove empty? ...) though. But if the inner loop were modified so no empty seqs that weren't already nil could be generated, it could be reduced to just (remove nil? ...) and be more efficient then. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en