Can someone explain to me what’s wrong with the following code? The compiler
claims: Unable to resolve symbol: union in this context. Have I musunderstood the cond syntax?
I’ve removed most of the real code and replaced with stubs 1, 2, 3, 4, leaving just enough to show the confusing error.
You are welcome to use ClojureVerse.org for questions such as this, of course. I wanted to point out the existence of the Clojurians Slack at https://clojurians.slack.com in case you were unaware of it. There is a #beginners channel there that is perfect for beginner-type questions and answers.
Correct, this is how you would do it in a namespace.
I think I would recommend against refer in this case, and prefer (ns ... (:require [clojure.set :as set]) and then use set/union. In general the norm is to minimize refer for clarity’s sake.