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

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -