This shaves 14 characters off of Chouser's solution:
(defn enc[s e](apply str(map(apply hash-map(take-nth 2 e))s)))

rzezeski:  The problem statement  is somewhat ambiguous about what to
do if the character is missing from the mapping.  It says you can just
"skip it", and this short solution does exactly that.  This is also
what most of the solutions appear to be doing.  So you may be making
more work for yourself by making the mapping default to the same
character.  Either way, this approach will save you 14 characters.

And, of course, you can shave off another 2 with a terser name than enc.

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to