symbols - What are all of clojure's special forms? -


as part of improving cider's debugger, need implement special handling possible special-forms. in order words, need know symbols satisfy special-symbol?. doc page on special forms, while helpful, doesn't offer of them.

for instance, after experimentation, i've learned that

  1. most of forms listed there have * counterpart (let* , loop*, instance).
  2. there clojure.core/import* special-symbol (which wouldn't have found if not sheer luck).

is there complete list of special symbols?
alternatively, there way list interned symbols? if so, filter on special-symbol?.

looking @ definition of special-symbol? provides big clue:

(defn special-symbol?   "returns true if s names special form"   {:added "1.0"    :static true}   [s]     (contains? (. clojure.lang.compiler specials) s)) 

thus:

user=> (pprint (keys (. clojure.lang.compiler specials))) (&  monitor-exit  case*  try  reify*   loop*   letfn*  if  clojure.core/import*  new  deftype*  let*  fn*  recur  set!  .  var  quote  catch  throw  monitor-enter  def) 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -