From: Andy Wingo <wingo@pobox.com>
To: "Maciek Godek" <pstrychuj@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Getting a type of a variable
Date: Sat, 19 Jul 2008 10:53:57 +0200 [thread overview]
Message-ID: <m363r2tftm.fsf@pobox.com> (raw)
In-Reply-To: <e2ceda030807181448j655c92edh74716db258351124@mail.gmail.com> (Maciek Godek's message of "Fri, 18 Jul 2008 23:48:12 +0200")
On Fri 18 Jul 2008 23:48, "Maciek Godek" <pstrychuj@gmail.com> writes:
> Hello,
> I'm looking for an efficient way to check the
> type of an SCM variable. I imagine that I
> could write something like:
> (define (type? x)
> (cond ((integer? x) 'int)
> (cond ((real? x) 'double)
> ...
> )
(oop goops)'s `class-of'
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2008-07-19 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 21:48 Getting a type of a variable Maciek Godek
2008-07-19 8:53 ` Andy Wingo [this message]
2008-07-20 20:48 ` Ludovic Courtès
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=m363r2tftm.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-user@gnu.org \
--cc=pstrychuj@gmail.com \
/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).