Re: Fixing Lisp

2009-12-26 Thread kyle smith
This isn't fully tested, but it should work. Lisp doesn't need fixing. (defmacro switch [choice-seq & clause-maps] (let [choice (first choice-seq) clauses (map #(apply concat %) clause-maps)] `(condp = ~choice ~@(apply concat (map (fn [clause] [

Re: Fixing Lisp

2009-12-24 Thread kaveh_shahbazian
Thanks to all! I think I should use another (more fun or irrelevant - based on one's eye-line!) example for custom "form separators"; something like this: (switch (choice) {my-choice (having-fun) } {(your-choice) (being-pragmatic) } {(their-choice) (lisp

Re: Fixing Lisp

2009-12-24 Thread Luc Prefontaine
Lisp syntax needs some fixing ? It's not April 1st yet or did I hibernate through winter suddenly ? I'll run to the window to see if my tulips are out :))) Luc Sent from my iPod On Dec 24, 2009, at 1:58 PM, kaveh_shahbazian wrote: > Well; this is a fun tradition after all and number o

Re: Fixing Lisp

2009-12-24 Thread David Nolen
On Thu, Dec 24, 2009 at 12:58 PM, kaveh_shahbazian < kaveh.shahbaz...@gmail.com> wrote: > This has been done in Clojure to some extend for Vectors and Sets. > What if we could choose a custom separator in out macros? For example > `begin and `end? This way one can write code in more common flavors

Re: Fixing Lisp

2009-12-24 Thread Dan
> > So If I look ridiculous, I apologize in advance. > > Don't worry, you'd be in good company anyway :) Why don't you implement it and try it? It should be fairly easy to create a translator that would turn any of those proposals into regular clojure before compiling. Try it out for a while, see

Fixing Lisp

2009-12-24 Thread kaveh_shahbazian
Well; this is a fun tradition after all and number of participants is huge! (All failed of-course :) ) Is short idea is: Having the choice of custom separators. This has been done in Clojure to some extend for Vectors and Sets. What if we could choose a custom separator in out macros? For example