• (.?. x form)
  • (.?. x form & forms)
Same as clojure.core/.. but returns nil as soon as the threaded value is nil itself (thus short-circuiting any pending computation).
Examples :
(.?. "foo" .toUpperCase (.substring 1)) returns "OO"
(.?. nil .toUpperCase (.substring 1)) returns nil

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/core.clj:38 top

(defnilsafe 
  "Same as clojure.core/.. but returns nil as soon as the threaded value is nil itself (thus short-circuiting any pending computation).
   Examples :
   (.?. \"foo\" .toUpperCase (.substring 1)) returns \"OO\"
   (.?. nil .toUpperCase (.substring 1)) returns nil
   "
   .. .?.)
Vars in clojure.contrib.core/.?.: ..
Used in 0 other vars

Comments top

No comments for .?.. Log in to add a comment.