Hello,

On Dec 18, 5:49 am, Chouser <[email protected]> wrote:
> Which leads me to this, though it fails for reasons that escape me:
> (defn enc[s e](apply str(map`{~@(take-nth 2 e)}s)))

This one maybe fails because ~@ is a reader form that needs to expand
at compile time.
So if at compile time, e is not known (e.g. if e refers to a
function's argument), it fails.
But maybe, during the tests, e was bound to a literal string (and thus
usable at compile to for the expansion).

> But here's a form that works, oddly, and still manages to shave off a
> couple chars:
>
> (defn enc[s e](apply str(map`{0~@(cons 0(take-nth 2 e))}s)))
>
> --Chouser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to