Lambda-X / cljs-repl-web

ClojureScript implementation of a browser Read-Eval-Print-Loop
Eclipse Public License 1.0
68 stars 15 forks source link

Weird source output when nothing required #180

Open arichiardi opened 8 years ago

arichiardi commented 8 years ago

As first command, nothing required, this is the output (it should be nil):

cljs.user=> (source map)
([] nil)
arichiardi commented 8 years ago

From the output it looks we have the right meta available:

cljs.analyzer/resolve-var returned {:protocol-inline nil,
 :meta
 {:file "cljs/core.cljs",
  :line 4189,
  :column 7,
  :end-line 4189,
  :end-column 10,
  :arglists
  '([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]),
  :doc
  "Returns a lazy sequence consisting of the result of applying f to\n  the set of first items of each coll, followed by applying f to the\n  set of second items in each coll, until any one of the colls is\n  exhausted.  Any remaining items in other colls are ignored. Function\n  f should accept number-of-colls arguments. Returns a transducer when\n  no collection is provided.",
tomasz-biernacki commented 8 years ago

Here are also other examples:

cljs.user=> (source max)
cljs.user=> (source min)
([x y & more]
   (reduce max (cljs.core/max x y) more))