[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?
From: |
Andy Wingo |
Subject: |
Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ? |
Date: |
Wed, 01 Sep 2010 08:23:45 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi,
It's ugly, but a quick solution:
On Wed 01 Sep 2010 00:12, Cedric Cellier <address@hidden> writes:
> I'm doing this :
>
> (if (not defined? 'foo) (define foo bar))
>
> without realizing it's not legal scheme.
> What would be the idiomatic way to write this ?
(define foo
(if (defined? 'foo)
foo
bar))
Andy
--
http://wingolog.org/