Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shayanjm
Created March 26, 2015 02:02
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 shayanjm/51cd5cbfc7e030798b3f to your computer and use it in GitHub Desktop.
Save shayanjm/51cd5cbfc7e030798b3f to your computer and use it in GitHub Desktop.
(generate-next-layer [{:x 0 :y 0}])
;=> ([{:x 0.0, :y 373.70379130434486} {:x 179.61093190691673, :y 31.472758607586837}])
(generate-next-layer [{:x 0.0, :y 373.70379130434486} {:x 179.61093190691673, :y 31.472758607586837}])
;=> ([{:x 360.0, :y 0.3369451182208749} {:x 358.81906915838806, :y 0.25270756413770395}] [{:x 179.61093190691673, :y 75.79422135543957} {:x 401.544995647207, :y 26.665916107884}])
(nth (iterate generate-next-layer [{:x 0 :y 0}]) 4)
;=> NullPointerException clojure.lang.RT.doubleCast (RT.java:1222)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment