Yes and no.
There’s the send to repl functions. And there’s the eval functions.
The send to repl functions are like if you copy/pasted things in the REPL window and pressed enter. So they are executed in the context of your REPL window. So if you send some defn form it will just send that. It won’t send anything else.
The eval functions evaluate the form within the context of the first ns form found backward from the form you are evaluating. So if you evaluate some defn and above the defn you have
(ns foo) and your REPL window is in the
user namespace, Cider will switch to foo and evaluate the defn, but it’s not switching your REPL window, in the REPL window you are still going to be inside the user namespace.
The output of the send to repl functions will show in the REPL window.
The output of the eval functions will show inline with the code.