3 ms·
Actually, when I said 'update', I meant the functions that in standard languages that would modify the existing structure return a new one, but it's great you f
by arohner 16y ago
Actually, when I said 'update', I meant the functions that in standard languages that would modify the existing structure return a new one, but it's great you found update-in. That's a beautiful function. There's also assoc-in, which is basically just a more specialized assoc-in.
I've built cyclical graphs in Clojure. The simplest form looks like
{:nodes #{:a :b :c}
:edges {:a #{:b}
:b #{:c}
:c #{:a}}}
(for non-clojurians, {} is a map, and #{} is a set)