Skip to content

Instantly share code, notes, and snippets.

@fehrenbach
fehrenbach / index.html
Created July 25, 2011 19:17
ClojureScript and Sencha Touch
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello World</title>
<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
<script type="text/javascript" src="out/goog/base.js"></script>
<script src="test.js" type="text/javascript"></script>
<script>goog.require('test');</script>
(progress
[timestamp]
(let [[out in] (split-with #(< (first %) timestamp) end-timestamp-sorted-map)
new-sorted-map (into (sorted-map) in)
new-hashed-map (reduce
dissoc key-hashed-map
(map first
(filter #(empty? (second %))
(reduce
(fn [m x]
(deftype Element [data start end] :as this
clojure.lang.Associative
(assoc [key value]
(apply (fn [data start end]
(Element. data start end))
(vals (assoc {:data (:data this)
:start (:start this)
:end (:end this)}
key value)))))