Hi Tomas,

> (let @S '((I . 0))
>    (def 'count (fill '(() (job '@S (inc 'I)))))
>    (def 'reset (fill '(() (job '@S (zero I))))))
> ...
> http://www.software-lab.de/faq.html#closures discusses curry function
> which allows closure "inside" a single function only.

With a little trick, you could also use it here:

   (let I '(0)
      (def 'count (curry (I) () (inc I)))
      (def 'reset (curry (I) () (set I 0))) )

Perhaps there are other/better solutions?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to