decimal?

clojure.core

  • (decimal? n)
Returns true if n is a BigDecimal

1 Example top

  • user=> (decimal? 1)
    false
    
    user=> (decimal? 1.0)
    false
    
    user=> (decimal? 1M)
    true
    
    user=> (decimal? 99999999999999999999999999999999999)
    false
    
    user=> (decimal? 1.0M)
    true
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3191 top

(defn decimal?
  "Returns true if n is a BigDecimal"
  {:added "1.0"
   :static true}
  [n] (instance? BigDecimal n))
Vars in clojure.core/decimal?:
Used in 0 other vars

Comments top

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