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
;;uses core.async and refers chan, >!, go, alts!! and timeout functions | |
(def c (chan)) | |
(go (>! c {:msg "hi"})) | |
(defn peek! [ch & args] | |
"quickly looks at a channel for new incoming data, pulls it if it exists, quits otherwise; | |
returns seq if specifying max elements to pull" | |
(if-not (nil? args) |
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
;; (ns somenamespace | |
;; (:refer-clojure :exclude [* - + == /]) | |
;; (:use clojure.core.matrix) | |
;; (:use clojure.core.matrix.operators) | |
;; (:gen-class)) | |
(defn inv [n] "returns the inverse, (* -1 n)" (* -1 n)) | |
(defn projection [l r b t, n f, aspect fov] |
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
(defentity INFORMATION_SCHEMA.tables) | |
(def tables (map #(get % :TABLE_NAME) | |
(select 'INFORMATION_SCHEMA.tables (fields :TABLE_NAME) | |
(where {:TABLE_TYPE "BASE TABLE"})))) ;notice the quote | |
(prn tables) | |
;(map #(def %) tables) ;additional concept | |
(map #(defentity %) tables) ;not sure this is required anymore | |
(select (first tables)) |
NewerOlder