Last active
December 17, 2015 01:09
-
-
Save frenchy64/5526264 to your computer and use it in GitHub Desktop.
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
(ann -main [String * -> Any]) | |
(defn -main [& args] | |
(let [[options args banner] | |
(cli args | |
["--percolation" "Run the percolation example" :default false, :flag true] | |
["--rows" "Number of rows in simulation." :default 100, :flag false, :parse-fn #(Long/parseLong %)] | |
["--cols" "Number of columns in simulation." :default 100, :flag false, :parse-fn #(Long/parseLong %)] | |
["-h" "--help" "Display usage." :default false, :flag true])] | |
(print-env "cli") | |
...)) | |
"cli"{:env {banner java.lang.String, | |
args17302 (clojure.lang.Seqable java.lang.String), | |
options (CompleteHMap {:help java.lang.Boolean, | |
:cols (U long (Value 100)), | |
:rows (U long (Value 100)), | |
:percolation java.lang.Boolean}), | |
...}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment