Skip to content

Instantly share code, notes, and snippets.

@rm-hull
rm-hull / turtle-demo.cljs
Last active December 15, 2015 08:18
Demo clojurescript gist to test out http://programming-enchiladas.destructuring-bind.org/ -- draws a simple pentagon and other geometric stars using turtle graphics
;; Draws a simple pentagon and other geometric stars using turtle graphics
;;
;; Scale it to fit in a bounding-box of 750x550 px
(ns turtle.demo
(:use [turtle.core :only [draw!]]
[turtle.renderer.canvas :only [->canvas]]
[jayq.core :only [show]]
[enchilada :only [ctx canvas]]))
@rm-hull
rm-hull / simple-demo.cljs
Last active December 15, 2015 04:19
Demo clojurescript gist for programming enchiladas
(ns example)
;; Print output goes to the output buffer
(doseq [a (range 10)
b (range a)]
(println a "x" b "=" (* a b)))
(js/alert "ClojureScript says 'Boo!'")