-
These notes accompany a talk I gave on the 15th of May at the Computer Science Dept of UCT.
-
Slides: https://speakerdeck.com/robertstuttaford/functional-programming-star-isnt-star-scary
This file contains 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 characters
Check out README.md to get started editing Clojure with Emacs. |
This file contains 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 characters
(defn start-session! | |
[] | |
;; put-value! talks to ring's sessions dsl | |
(put-value! :session-uuid (db/new-uuid))) | |
(defn uuid | |
[] | |
;; get-value talks to ring's sessions dsl | |
(get-value :session-uuid)) |
This file contains 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 characters
(def conn (d/conn some-uri)) | |
(def some-id 12345) | |
(defn get-v [db] (ffirst (d/q '[:find ?v :in $ ?e :where [?e :some/attribute ?v]] db some-id))) | |
(get-v (d/db conn)) | |
;; => :some-value | |
(def tx [[:db/retract some-id :some/attribute :some-value] |
-
These notes accompany a talk I gave on the 19th of April at ScaleConf 2013.
-
Slides: https://speakerdeck.com/robertstuttaford/cognicians-new-architecture-with-clojure-and-datomic
NewerOlder