Liking cljdoc? Tell your friends :D

clojure.algo.generic.arithmetic

Generic arithmetic interface This library defines generic versions of + - * / as multimethods that can be defined for any type. The minimal required implementations for a type are binary + and * plus unary - and /. Everything else is derived from these automatically. Explicit binary definitions for - and / can be provided for efficiency reasons.

Generic arithmetic interface
This library defines generic versions of + - * / as multimethods
that can be defined for any type. The minimal required
implementations for a type are binary + and * plus unary - and /.
Everything else is derived from these automatically. Explicit
binary definitions for - and / can be provided for
efficiency reasons.
raw docstring

*clj/smultimethod

(* x)
(* x y)
(* x y & more)

Return the product of all arguments. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return the product of all arguments. The minimal implementation for type
::my-type is the binary form with dispatch value [::my-type ::my-type].
sourceraw docstring

+clj/smultimethod

(+ x)
(+ x y)
(+ x y & more)

Return the sum of all arguments. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return the sum of all arguments. The minimal implementation for type
::my-type is the binary form with dispatch value [::my-type ::my-type].
sourceraw docstring

-clj/smultimethod

(- x)
(- x y)
(- x y & more)

Return the difference of the first argument and the sum of all other arguments. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return the difference of the first argument and the sum of all other
arguments. The minimal implementation for type ::my-type is the binary
form with dispatch value [::my-type ::my-type].
sourceraw docstring

->one-typeclj/s≠

(->one-type)
clj

Positional factory function for class clojure.algo.generic.arithmetic.one-type.

Positional factory function for class clojure.algo.generic.arithmetic.one-type.
cljs

Positional factory function for clojure.algo.generic.arithmetic/one-type.

Positional factory function for clojure.algo.generic.arithmetic/one-type.
sourceraw docstring

->zero-typeclj/s≠

(->zero-type)
clj

Positional factory function for class clojure.algo.generic.arithmetic.zero-type.

Positional factory function for class clojure.algo.generic.arithmetic.zero-type.
cljs

Positional factory function for clojure.algo.generic.arithmetic/zero-type.

Positional factory function for clojure.algo.generic.arithmetic/zero-type.
sourceraw docstring

/cljmultimethod

(/ x)
(/ x y)
(/ x y & more)

Return the quotient of the first argument and the product of all other arguments. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return the quotient of the first argument and the product of all other
arguments. The minimal implementation for type ::my-type is the binary
form with dispatch value [::my-type ::my-type].
sourceraw docstring

divcljsmultimethod

(div x)
(div x y)
(div x y & more)

Return the quotient of the first argument and the product of all other arguments. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return the quotient of the first argument and the product of all other
arguments. The minimal implementation for type ::my-type is the binary
form with dispatch value [::my-type ::my-type].
sourceraw docstring

map->one-typeclj/s≠

clj
(map->one-type m__7873__auto__)

Factory function for class clojure.algo.generic.arithmetic.one-type, taking a map of keywords to field values.

Factory function for class clojure.algo.generic.arithmetic.one-type, taking a map of keywords to field values.
cljs
(map->one-type G__1183)

Factory function for clojure.algo.generic.arithmetic/one-type, taking a map of keywords to field values.

Factory function for clojure.algo.generic.arithmetic/one-type, taking a map of keywords to field values.
sourceraw docstring

map->zero-typeclj/s≠

clj
(map->zero-type m__7873__auto__)

Factory function for class clojure.algo.generic.arithmetic.zero-type, taking a map of keywords to field values.

Factory function for class clojure.algo.generic.arithmetic.zero-type, taking a map of keywords to field values.
cljs
(map->zero-type G__1169)

Factory function for clojure.algo.generic.arithmetic/zero-type, taking a map of keywords to field values.

Factory function for clojure.algo.generic.arithmetic/zero-type, taking a map of keywords to field values.
sourceraw docstring

oneclj/s

source

one-typecljs

source

zeroclj/s

source

zero-typecljs

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close