Created
June 28, 2013 16:31
Solve this problem: http://v2ex.com/t/74002
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(for [col (partition-by #(> (second %) 0) (map-indexed vector lst)) | |
:when (every? #(> (second %) 0) col)] | |
[(count col) [(first (first col)) (first (last col))]]) | |
;user> ([3 [3 5]] [8 [11 18]] [7 [24 30]] [6 [36 41]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment