unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Cedric Cellier <rixed@happyleptic.org>
Cc: guile-user@gnu.org
Subject: Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?
Date: Wed, 01 Sep 2010 08:23:45 -0700	[thread overview]
Message-ID: <m3occhv666.fsf@unquote.localdomain> (raw)
In-Reply-To: <20100901071233.GA27835@securactive.net> (Cedric Cellier's message of "Wed, 1 Sep 2010 09:12:33 +0200")

Hi,

It's ugly, but a quick solution:

On Wed 01 Sep 2010 00:12, Cedric Cellier <rixed@happyleptic.org> 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/



  reply	other threads:[~2010-09-01 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 12:49 Can't define in (if...) after (use-syntax (ice-9 syncase)) ? Cedric Cellier
2010-08-27 14:04 ` Andreas Rottmann
2010-09-01  7:12   ` Cedric Cellier
2010-09-01 15:23     ` Andy Wingo [this message]
2010-09-02  4:39       ` Keith Wright
2010-09-02 18:40         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3occhv666.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-user@gnu.org \
    --cc=rixed@happyleptic.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).