This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-07
Channels
- # announcements (1)
- # babashka (34)
- # bangalore-clj (2)
- # biff (2)
- # cider (63)
- # clj-commons (1)
- # clj-kondo (4)
- # cljdoc (44)
- # clojure (65)
- # clojure-europe (45)
- # clojure-nl (4)
- # clojure-norway (85)
- # clojure-uk (5)
- # clojurescript (5)
- # cursive (11)
- # datomic (8)
- # graalvm (11)
- # honeysql (7)
- # hoplon (9)
- # hyperfiddle (3)
- # introduce-yourself (1)
- # matrix (2)
- # missionary (17)
- # overtone (2)
- # polylith (6)
- # portal (16)
- # re-frame (24)
- # releases (2)
- # sci (45)
- # xtdb (9)
think I remember something akin to (set! *warn-on-reflection* true)
, but it outputs forms as javascript on the repl. is that a thing?
cljs.user=> (doc *print-fn-bodies*)
-------------------------
cljs.core/*print-fn-bodies*
*print-fns-bodies* controls whether functions print their source or
only their names.
nil
cljs.user=> (set! *print-fn-bodies* true)
true
and then
cljs.user=> (defn foo [x] (cond (even? x) (inc x) (odd? x) (dec x)))
#'cljs.user/foo
cljs.user=> foo
#object[cljs$user$foo "function cljs$user$foo(x){
if(cljs.core.even_QMARK_.call(null,x)){
return (x + (1));
} else {
if(cljs.core.odd_QMARK_.call(null,x)){
return (x - (1));
} else {
return null;
}
}
}"]
that's it! thanks!