Skip to content

Instantly share code, notes, and snippets.

@eschulte
Created October 14, 2011 18:45
Show Gist options
  • Save eschulte/1287946 to your computer and use it in GitHub Desktop.
Save eschulte/1287946 to your computer and use it in GitHub Desktop.
(define linear-pa
N -> (snd (reduce
(/. X Y
(let Pnt (pick (fst Y))
(@p [Pnt X|(fst Y)] (@p [X|(fst (snd Y))] [[X Pnt]|(snd (snd Y))]))))
(@p [0] (@p [0] [])) (range 1 (- N 1)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment