Function: clojure--fn-tail-sites

clojure--fn-tail-sites is a byte-compiled function defined in clojure-mode.el.

Signature

(clojure--fn-tail-sites CHILDREN END)

Documentation

Return the binding sites of the arities of a fn.

CHILDREN are the forms of the fn that come after its name, and END is the end of the fn.

Source Code

;; Defined in ~/.emacs.d/elpa/clojure-mode-20261103.1226/clojure-mode.el
(defun clojure--fn-tail-sites (children end)
  "Return the binding sites of the arities of a fn.
CHILDREN are the forms of the fn that come after its name, and END is
the end of the fn."
  (when-let* ((tail (seq-drop-while (lambda (child)
                                      (not (memq (clojure--form-type child) '(vector list))))
                                    children)))
    (if (eq (clojure--form-type (car tail)) 'vector)
        (list (list (car tail) (clojure--parse-pattern (car tail)) end))
      (delq nil
            (mapcar (lambda (arity)
                      (when-let* (((eq (clojure--form-type arity) 'list))
                                  (arglist (car (clojure--form-values arity)))
                                  ((eq (clojure--form-type arglist) 'vector)))
                        (list arglist (clojure--parse-pattern arglist)
                              (clojure--form-end arity))))
                    tail)))))