make 'symbol' work on keywords and vars

Description

Port this change from Clojure master to ClojureScript: https://github.com/clojure/clojure/commit/d29219f78e51da66daf1c66108ebebb97c68442f

Implementation guidance:

For Vars, there is a var? predicate, and given a Var v, it is possible to obtain its symbol by using (.-sym v).

Likewise, for keywords, there is a keyword? predicate, and given a Keyword k, it is possible to form a symbol using (symbol (.-fqn k)).

Environment

None

Activity

Show:
Enzzo Cavallo
December 3, 2018, 9:03 PM

v3 with docstring

Enzzo Cavallo
December 3, 2018, 9:06 PM

v4 now with COMMITED docstrings

Mike Fikes
December 3, 2018, 10:45 PM
Mike Fikes
December 3, 2018, 10:48 PM

Enzzo, also, if you look at the v4 patch, it appears the commit title was lost relative to the original CLJS-2958.patch, which had:

Mike Fikes
December 6, 2018, 1:03 AM

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

Approval

Accepted

Patch

Code and Test

Priority

Blocker
Configure