Repeated lists of features is a code smell. Rationalizing those to a type makes code smaller, smarter.
This commit is contained in:
parent
e079cd21cd
commit
fbd0d93f75
|
@ -177,6 +177,8 @@
|
||||||
""
|
""
|
||||||
(get (get cts 0) 1))))
|
(get (get cts 0) 1))))
|
||||||
|
|
||||||
|
(defn tap [a] (print a) a)
|
||||||
|
|
||||||
(defn suggest [opts]
|
(defn suggest [opts]
|
||||||
(let [[(, local-artist local-album) (artist-album)]
|
(let [[(, local-artist local-album) (artist-album)]
|
||||||
|
|
||||||
|
@ -206,16 +208,12 @@
|
||||||
"--album \"{}\""
|
"--album \"{}\""
|
||||||
"--genre \"{}\""
|
"--genre \"{}\""
|
||||||
"--song \"{}\""
|
"--song \"{}\""
|
||||||
"\"{}\""] " ")]]
|
"\"{}\""] " ")]
|
||||||
|
|
||||||
|
[finalizer (fn (seq) (+ [format-string] (list (map (fn [i] (get seq i)) (xrange 0 6)))))]]
|
||||||
|
|
||||||
(ap-each newmp3s
|
(ap-each newmp3s
|
||||||
(print (.format format-string
|
(print (apply .format (finalizer it))))))
|
||||||
(get it 0)
|
|
||||||
(get it 1)
|
|
||||||
(get it 2)
|
|
||||||
(get it 3)
|
|
||||||
(get it 4)
|
|
||||||
(get it 5))))))
|
|
||||||
|
|
||||||
(defmain [&rest args]
|
(defmain [&rest args]
|
||||||
(try
|
(try
|
||||||
|
|
Loading…
Reference in New Issue