diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
| commit | db4c329aff4621e05b92a55be4f18173f5a4f655 (patch) | |
| tree | 92baaa6d88246e509cfd6a7d03d8fab997e0b935 /clojure/src/core.clj | |
| parent | 8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 (diff) | |
| download | mal-db4c329aff4621e05b92a55be4f18173f5a4f655.tar.gz mal-db4c329aff4621e05b92a55be4f18173f5a4f655.zip | |
All: perf test, Makefile refactor, add *host-language*
Other:
- bash,make,postscript: quasiquote of vectors
- Fix Java slurp
- add time function to core.mal
- switches on *host-language* for make time-secs vs time-ms
- Ignore */experiments directories
Diffstat (limited to 'clojure/src/core.clj')
| -rw-r--r-- | clojure/src/core.clj | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clojure/src/core.clj b/clojure/src/core.clj index 73d8fb4..6b0d9b5 100644 --- a/clojure/src/core.clj +++ b/clojure/src/core.clj @@ -5,7 +5,12 @@ (defn mal_throw [obj] (throw (ex-info "mal exception" {:data obj}))) -;; Metadata +;; Number functions + +(defn time-ms [] + (System/currentTimeMillis)) + +;; Metadata functions ;; - store metadata at :meta key of the real metadata (defn mal_with_meta [obj m] (let [new-meta (assoc (meta obj) :meta m)] @@ -14,8 +19,7 @@ (defn mal_meta [obj] (:meta (meta obj))) - -;; Atoms +;; Atom functions (defn atom? [atm] (= (type atm) clojure.lang.Atom)) @@ -43,6 +47,7 @@ ['- -] ['* *] ['/ /] + ['time-ms time-ms] ['list list] ['list? seq?] |
