This function gives me a nicely formatted name if the user has supplied a 
first_name or a last_name, however, if there is no first_name and no 
last_name then I get nothing at all. But the username is there in the 
record. Can someone tell me what I did wrong? Why is the username not 
getting set as the value of user-nice-name? 


(defn make-user-nice-name [map-of-profile]
  (let [user-nice-name
        (if-not (or (nil? (:first_name map-of-profile)) (nil? (:last_name 
map-of-profile)))
          (apply str (:first_name map-of-profile) " " (:last_name 
map-of-profile))
          (:username map-of-profile))]
    user-nice-name))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to