Last active
January 1, 2016 08:19
-
-
Save amontalenti/8117294 to your computer and use it in GitHub Desktop.
Clojure example of lightweight data modelling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cljtests.data) | |
(defn main [] | |
(let [some-items [1 2 3 4] | |
some-mapping {:ST "started", :IP "in progress", :DN "done"}] | |
(doseq [item some-items] | |
(println item)) | |
(doseq [[key val] some-mapping] | |
(println (str key " => " val))))) | |
(defn -main | |
[& args] | |
(main)) |
Thanks! Updated to reflect that style consistency.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, that example is certainly more symmetrical. Minor suggestion:
From https://github.com/bbatsov/clojure-style-guide