2017-09-06 15:18 GMT+02:00 Cecil Westerhof <cldwester...@gmail.com>: > 2017-09-06 14:15 GMT+02:00 Gary Trakhman <gary.trakh...@gmail.com>: > >> The second to last apply argument doesn't spread args like the last slot. >> > > OK, I changed it to: > (def digits > (apply str (map char (inclusive-range (int \0) (int \9))))) > (def hex-digits > (str digits > (apply str (map char (inclusive-range (int \A) (int \F)))))) > (def alphanumerics > (str digits > (apply str (map char (inclusive-range (int \A) (int \Z)))) > (apply str (map char (inclusive-range (int \a) (int \z)))) > )) > > That does what it should. I should probably create a function for the > apply str … >
Done: (defn string-from-range [start end] (apply str(map char (range (int start) (inc (int end)))))) (def digits (string-from-range \0 \9)) (def hex-digits (str digits (string-from-range \A \F))) (def alphanumerics (str digits (string-from-range \A \Z) (string-from-range \a \z) )) -- Cecil Westerhof -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.