Created
November 7, 2011 18:37
-
-
Save smee/1345769 to your computer and use it in GitHub Desktop.
problem 79 temp
This file contains hidden or 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
| (fn [coll] (reduce (fn [l c] (map + c (map (partial min) (partition 2 1 l)))) (reverse coll))) | |
| problem 132 (oome) | |
| (fn [pred sep coll] | |
| (flatten | |
| (for [[a b] (partition 2 1 (concat coll [(last coll)]))] | |
| (if (pred a b) [a sep] a)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment