Why use cider-send-ns-form-to-repl instead of cider-send-function-to-repl in Emacs Cider?

Is there any difference between cider-send-ns-form-to-repl and cider-send-function-to-repl?

For example, I have the following form in my clj file:

(ns e01.rebl-examples
  (:import java.io.File)
  (:require [clojure.java.io :as io]
            [clojure.core.protocols :as p]))

I can send this form to repl using both commands. I’d prefer cider-send-function-to-repl because I can use it with any form.

1 Like