Hacker News new | ask | show | jobs
by personx 4072 days ago
I don't fully understand the direction you were going with some of the solutions, something like this would work no?

(defn digits [num] (let [ x (map str (str num)) s (map read-string x)] (apply + (map #(* % %) s))))

I do think the interviewer should have pointed you in the right direction or offer some sort of hint to gain an understanding of how comfortable you are with the language rather then just having you fumble around but depending on the role they were hiring for these questions and this practice don't seem bad to me