>
> (defn lis [coll]
>   (or (->> coll
>            (partition-between (partial apply >=))
>            (sort-by (comp - count))
>            (filter next)
>            (first))
>       []))

Totally agree on decomposing the problem into a single independent
steps. This is what I did not like about the trick (partition 2 1)
trick although I feel envious somewhat that I did not come up with it.
The trick introduced the semi-side-effect between functions as the
notion of pairs (which has nothing to do with the problem itself )
was not isolated just to a single step.

Now above solution which is closer to my Scala flow still suffers from
the build in sort ... it almost seems we need a nested reduce to make
the solution input sequence length independent

A.

-- 
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

Reply via email to