Bob Tolbert f5d88bb108 gensym in Hy
Simple implementation of gensym in Hy.

Returns a new HySymbol.

Usable in macros like:

(defmacro nif [expr pos zero neg]
  (let [[g (gensym)]]
    `(let [[~g ~expr]]
       (cond [(pos? ~g) ~pos]
             [(zero? ~g) ~zero]
             [(neg? ~g) ~neg]))))

This addresses all the general comments about (gensym), and doesn't
try to implement "auto-gensym" yet. But clearly the macro approach
instead of the pre-processor approach (as described in the
letoverlambda (http://letoverlambda.com/index.cl/guest/chap3.html#sec_5)
is the way to go
2013-12-15 12:36:36 -07:00
..
2013-07-06 20:39:02 +02:00
2013-07-28 17:36:36 +02:00
2013-09-29 18:13:28 +02:00
2013-04-28 17:04:33 +02:00
2013-12-15 12:36:36 -07:00
2013-07-13 09:55:16 -06:00