Good morning Tom,

Skimming through the code I found:

  (defmacro aif
    [test then-form else-form]
    `(let [~'it ~test]
       (if ~test
         ~then-form
         ~else-form)))

The test form is evaluated twice, probably not what you want.  You
could replace this macro with an (or ..) form.  The only place this
macro is used (format.clj line 385):

  expchar (aif (:exponentchar params) it \E)

would become:

  expchar (or (:exponentchar params) \E)

Regards,
Remco


On Mon, Dec 22, 2008 at 8:30 AM, Tom Faulhaber <tomfaulha...@gmail.com> wrote:
>
> Good Evening Clojurians,
>
> I have been working on a Clojure implementation of the format function
> from Common Lisp and it's coming along well enough that I thought I'd
> share.
>
> You can see/download the current state of it in its github project:
> http://github.com/tomfaulhaber/cl-format/
>
> It's currently about 2/3 complete including iteration, conditionals,
> and floating point in all their various flavors. I'm finding that it's
> already a lot more useful than the Java format, but that might just be
> my bias :-). The README on github has a detailed implementation status
> that I keep up-to-date.
>
> If you don't know about Common Lisp's super-powerful format function,
> you can check it out here, in "Practical Common Lisp,"
> http://www.gigamonkeys.com/book/a-few-format-recipes.html or here, in
> "Common Lisp the Language,"
> http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node200.html.
>
> I'm definitely interested in feedback on it in terms of style, on what
> you're using it for, and on what features you'd like to see next. I
> also want to hear about bugs. I'm sure there are plenty!
>
> You can add feedback here, via github or find me as "replaca" on
> #clojure.
>
> Enjoy!
>
> Tom

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