I am writing a simple photo library application in Clojure. I have a library card that has a key :photos , which is a vector of photos. Then I have a function that adds a photo to the library --- it takes a library object and a photo to be added as arguments.
(defn add-to-library [library photo] ... )
It returns a library map with photo added.
Now I want to "display" this function above the list of photos. I need to pass the library object through one iteration to the next.
What is the idiomatic way to do this in Clojure?
source share