[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: |
Cedric Cellier |
Subject: |
Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ? |
Date: |
Wed, 1 Sep 2010 09:12:33 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
-[ Fri, Aug 27, 2010 at 04:04:25PM +0200, Andreas Rottmann ]----
> > guile> (use-syntax (ice-9 syncase))
> > guile> (if #t (define foo "bar"))
> > ERROR: invalid context for definition of foo
> > (...)
> >
> I think it's establishing stricter rules for `define' placement. Note
> that your code is not legal (R5RS) Scheme -- the define is misplaced;
> it's neither a top-level nor an internal define.
> (...)
> What do you want to achieve in your code?
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 ?
- Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?,
Cedric Cellier <=