Skip to content

Commit 893d5ee

Browse files
committed
add special-symbol?
1 parent 07f11ec commit 893d5ee

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎devnotes/corelib.org‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,10 @@ does what?
299299
* DONE keyword
300300
* DONE keyword?
301301
* DONE last
302-
* TODO lazy-cat
302+
* DONE lazy-cat
303303
* DONE lazy-seq
304304
* DONE let
305305
* DONE letfn
306-
** TODO needs compiler letfn*
307306
* line-seq
308307
* DONE list
309308
* DONE list*
@@ -494,7 +493,7 @@ as macro
494493
* DONE sorted-set
495494
* DONE sorted-set-by
496495
* TODO sorted?
497-
* TODO special-symbol?
496+
* DONE special-symbol?
498497
* spit
499498
* DONE split-at
500499
* DONE split-with

‎src/cljs/cljs/core.cljs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7169,3 +7169,8 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
71697169
(fn [x y]
71707170
(cond (pred x y) -1 (pred y x) 1 :else 0)))
71717171

7172+
(defn ^boolean special-symbol? [x]
7173+
(contains?
7174+
'#{if def fn* do let* loop* letfn* throw try*
7175+
recur new set! ns deftype* defrecord* . js* & quote}
7176+
x))

0 commit comments

Comments
 (0)