"get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
What am I doing wrong here? I want to call clojure.string/lower-case on the :incoming-message of this-users-conversation. If there is no message, I return an empty string. (defn discern-current-state [this-users-conversation] (cond (= (clojure.string/lower-case (get

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Ambrose Bonnaire-Sergeant
Is it possible :incoming-message is mapped to nil? On Fri, Oct 16, 2015 at 2:33 PM, Lawrence Krubner wrote: > What am I doing wrong here? I want to call clojure.string/lower-case on > the :incoming-message of this-users-conversation. If there is no message, I > return

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Francis Avila
Not-found is not the same is not-nil. Is it possible that this-users-converstation *does* have an :incoming-message key with a nil value? See the difference between these two cases: (get {} :a :not-found) => :not-found (get {:a nil} :a :not-found) => nil Notice also that records always

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
> Is it possible that this-users-converstation *does* have > an :incoming-message key with a nil value? Good catch! I feel like an idiot for not realizing that. On Friday, October 16, 2015 at 2:43:14 PM UTC-4, Francis Avila wrote: > > Not-found is not the same is not-nil. Is it possible that