Function: calculator-op-arity

calculator-op-arity is a byte-compiled function defined in calculator.el.gz.

Signature

(calculator-op-arity OP)

Documentation

Return OP's arity.

Current results are one of 2 (binary), +1 (postfix), -1 (prefix), or
0 (nullary).

Source Code

;; Defined in /usr/src/emacs/lisp/calculator.el.gz
;;;---------------------------------------------------------------------
;;; Operators

(defun calculator-op-arity (op)
  "Return OP's arity.
Current results are one of 2 (binary), +1 (postfix), -1 (prefix), or
0 (nullary)."
  (let ((arity (nth 3 op)))
    (cond ((numberp arity)                      arity)
          ((eq calculator-unary-style 'postfix) +1)
          (t                                    -1))))