1.3.0 permalink Arrow_down_16x16



  • (defn- name & decls)
same as defn, yielding non-public def

1 Example top

  • user=> (ns test)
    test=> (defn- foo []
    test=> (defn bar []
           (str "Hello " (foo)))
    test=> (foo)
    test=> (bar)
    "Hello World!"
    test=> (ns playground)
    playground=> (test/bar)
    "Hello World!"
    ;; Error will be thrown
    ;; var: #'test/foo is not public
    playground=> (test/foo)
Log in to add / edit an example.

See Also top

  • 0

    Same as (def name (fn [params* ] exprs*)) or (def name (fn ([para

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:4331 top

(defmacro defn-
  "same as defn, yielding non-public def"
  {:added "1.0"}
  [name & decls]
    (list* `defn (with-meta name (assoc (meta name) :private true)) decls))
Vars in clojure.core/defn-:
Used in 0 other vars

Comments top

No comments for defn-. Log in to add a comment.