Skip to content

Instantly share code, notes, and snippets.

@siscia
Created February 14, 2013 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siscia/4954934 to your computer and use it in GitHub Desktop.
Save siscia/4954934 to your computer and use it in GitHub Desktop.
(defn map-over-nested
([f ar]
(if (> (vector-dimensionality ar) 1)
(mapv (fn [a] (map-over-nested f a)) ar)
(mapv f ar)))
([f ar br]
(if (> (vector-dimensionality ar) 1)
(mapv (fn [a b] (map-over-nested f a b)) ar br)
(mapv f ar br)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment