Skip to content

Instantly share code, notes, and snippets.

@leifwalsh
Created November 8, 2010 23:13
Show Gist options
  • Save leifwalsh/668451 to your computer and use it in GitHub Desktop.
Save leifwalsh/668451 to your computer and use it in GitHub Desktop.
(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