Guest User

Untitled

a guest
Oct 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ;; Helper functions
  2.  
  3. (defn save-blog-links
  4. [map-of-blogs-to-links]
  5. (doseq [[blog-name links] map-of-blogs-to-links]
  6. (println (str "Blog is " (name blog-name) " with links " links))))
  7.  
  8. (defn save-blog-buttons
  9. [map-of-blogs-to-buttons]
  10. (doseq [[blog-name buttons] map-of-blogs-to-buttons]
  11. (println (str "Blog is " (name blog-name) " with buttons " buttons))))
  12.  
  13. ;; Main processing function for your data structure
  14.  
  15. (defn save-blog-data
  16. [blog-data]
  17. (doseq [[timestamp {:keys [links buttons] :as datum}] blog-data]
  18. (save-blog-links links)
  19. (save-blog-buttons buttons))
Add Comment
Please, Sign In to add comment