On Tue 08 Feb 2011 23:58, Andy Wingo <[email protected]> writes:
> On Thu 03 Feb 2011 20:18, Mark Harig <[email protected]> writes:
>
>> scheme@(guile-user)> ,re (ice-9 readline)
>
> Actually now this causes an infinite loop. Doh. We need defvar,
> somehow...
What do people think about this:
(define-syntax define-once
(syntax-rules ()
((_ sym val)
(define sym (if (defined? 'sym) sym val)))))
Should work, no? I added this to boot-9 locally and used it in readline
and it appears to work fine.
Andy
--
http://wingolog.org/