ClojureDocs

Nav

Namespaces

-'

clojure.core

Available since 1.0 (source)
  • (-' x)
  • (-' x y)
  • (-' x y & more)
If no ys are supplied, returns the negation of x, else subtracts
the ys from x and returns the result. Supports arbitrary precision.
See also: -
1 Example
;; unlike the * and + functions there is no 0 arity form
(-')
;; ArityException: wrong number of args (0)

(-' 1)
;;=> -1 

(-' 6 3)  
;;=> 3

(-' 10 3 2)  
;;=> 5

(- 0 9000000000000000000 1000000000000000000)
;; ArithmeticException: integer overflow

(-' 0 9000000000000000000 1000000000000000000)
;;=> 10000000000000000000N 
See Also

If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the res...

Added by phreed

Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow...

Added by Dimagog

Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.

Added by Dimagog
0 Notes
No notes for -'