Is it unreasonable to return the var variable using let?
(let [pipeline (Channels/pipeline)] (.addLast pipeline "codec" (HttpClientCodec.)) ;; several more lines like this pipeline)
Is the binding here only a lexical area (as opposed to def) and unsafe to pass through?
Update When writing this question, I realized that it was ugly. And if something is ugly in Clojure, you are probably mistaken.
I think this is probably a more idiomatic way of handling the above (which makes the question controversial, and even convenient knowledge).
(doto (Channels/pipeline) (.addLast "codec" (HttpClientCodec.)))
source share