Created
November 8, 2010 23:13
-
-
Save leifwalsh/668451 to your computer and use it in GitHub Desktop.
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
(defn make-lines [data] | |
"Generates a collection of svg line elements based on the supplied data points" | |
(for [[idx [prev-val this-val]] (partition 2 (interleave (range) (partition 2 1 data)))] | |
(make-line idx prev-val (inc idx) this-val))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment