On Wed, Dec 17, 2008 at 6:15 PM, rzeze...@gmail.com <rzeze...@gmail.com> wrote:
>
> Neat challenge on stackoverflow:
> http://stackoverflow.com/questions/372668/code-golf-how-do-i-write-the-shortest-character-mapping-program
>
> I added an implementation in Clojure.  One that I'm sure could be
> greatly improved on.  I don't really care for the extremely obfuscated
> examples.  Sure, it's neat how far Perl can take things, but it's
> gibberish to me.  I tried to follow a middle ground between terse and
> readable and constrained myself to Clojure only (no contrib).
>
> Chouser, where you at?  I'm sure you could write something really
> sweet.

I don't think I agree with the premise of the question, that golf
answers help anyone learn about other languages.

But I can't deny that golfing is fun!

(defn enc[s e](apply str(map(into{}(for[[o _ n](partition 3 4 e)][o n]))s)))

I can't figure out how to edit your stackoverflow answer, but feel
free to put my answer in there if you want.

It may also be worth noting that to use the command line arguments,
you'd just need to add:

(apply enc *command-line-args*)

--Chouser

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