Clojure is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming.

learn more… | top users | synonyms

4
votes
0answers
126 views

How to represent hard-to-calculate “properties” of “objects” in functional code?

I have a polyline "class" in my Clojure program, which is represented by a vector of points. (It's not really a class or anything.) The polyline's length (in the geometric sense) is something that is ...
0
votes
0answers
16 views

More idiomatic syntax for 2nd level vector value update

I'm pretty sure there has to be a more idiomatic way of writing this: (defn update-2nd-level-vector [map index value] (assoc map :key1 (assoc (get map :key1) :key2 (-> map (get-in [:key1 ...