Last active
December 19, 2015 02:19
Revisions
-
swannodette revised this gist
Jun 28, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ (:require-macros [cljs.core.async.macros :as m :refer [go alt! alts!]])) (def c (chan)) (def loc-div (.getElementById js/document "location")) (.addEventListener js/window "mousemove" -
swannodette revised this gist
Jun 28, 2013 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,6 @@ (>! c [(.-x e) (.-y e)])))) (go (while true (let [loc (<! c)] (aset loc-div "innerHTML" (string/join ", " loc))))) -
swannodette revised this gist
Jun 28, 2013 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ (ns async-test.core (:require [cljs.core.async :refer [chan]] [clojure.string :as string]) (:require-macros [cljs.core.async.macros :as m :refer [go alt! alts!]])) @@ -14,5 +15,5 @@ (go (loop [] (let [loc (<! c)] (aset loc-div "innerHTML" (string/join ", " loc)) (recur)))) -
swannodette created this gist
Jun 28, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ (ns async-test.core (:require [cljs.core.async :refer [chan]]) (:require-macros [cljs.core.async.macros :as m :refer [go alt! alts!]])) (def c (chan 1)) (def loc-div (.getElementById js/document "location")) (.addEventListener js/window "mousemove" (fn [e] (go (>! c [(.-x e) (.-y e)])))) (go (loop [] (let [loc (<! c)] (aset loc-div "innerHTML" (apply str (interleave loc ", "))) (recur))))