I have a clj file using a certain namespace and I wish to define something belonging to another namespace, so I do :
(def other.namespace/name-of-something "value")
: but when I do this I get the result :
java.lang.Exception: Can't refer to qualified var that doesn't exist
Does anyone know why?
First, you’ll need to ensure that the namespace exists via a call to
create-ns:Then, you can use the
internfunction to add definitions to that namespace:You can confirm this is present with a call to
(ns-interns 'other.namespace).