1.2.3-SNAPSHOT permalink Arrow_down_16x16

factorial

incanter.core

  • (factorial k)

Returns the factorial of k (k must be a positive integer). Equivalent to R's
factorial function.

Examples:
(factorial 6)

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/math/tdouble/DoubleArithmetic.html
http://en.wikipedia.org/wiki/Factorial

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 incanter/core.clj:587 top

(defn factorial
"
  Returns the factorial of k (k must be a positive integer). Equivalent to R's
  factorial function.

  Examples:
    (factorial 6)

  References:
    http://incanter.org/docs/parallelcolt/api/cern/jet/math/tdouble/DoubleArithmetic.html
    http://en.wikipedia.org/wiki/Factorial

"
  ([^Integer k] {:pre [(and (number? k) (pos? k))]} (DoubleArithmetic/factorial k)))
Vars in incanter.core/factorial: defn
Used in 0 other vars

Comments top

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