From: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
To: kawa@sourceware.org
Subject: Re: Query on using `stream-cons' with srfi-14
Date: Thu, 24 Jul 2014 03:42:00 -0000 [thread overview]
Message-ID: <20140724034142.GA14862@odessa> (raw)
In-Reply-To: <F9834209-FD29-419F-A84C-1F0D0AAA26DE@theptrgroup.com>
On Wed, Jul 23, 2014 at 02:00:56PM -0400, Jamison Hope wrote:
> >
> >> What am I doing wrong? Please let me know if I am not being clear.
> >
> > stream-cons is syntax - specifically a macro.
> > It doesn't work to treat it as a value that is
> > available at run-time. (It might be reasonable for Kawa
> > to warn about this.)
> >
> > You would need to define cons-stream as a macro, for
> > example (untested code):
> >
> > (define-syntax cons-stream
> > (syntax-rules ()
> > ((_ a b) (stream-cons a b))))
>
>
> It'll also work to define cons-stream as an alias:
>
> (define-alias cons-stream stream-cons)
Thanks. This works perfectly.
> BTW the streams stuff is in SRFI-41, not SRFI-14. At first
> I was very confused by what the char-set library had to do
> with streams working or not working.
Sorry. This was an idiotic typo; the code actually "requires"
srfi-41. Sorry!
Kumar
--
Kumar Appaiah
next prev parent reply other threads:[~2014-07-24 3:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 11:23 Kumar Appaiah
2014-07-23 17:45 ` Per Bothner
2014-07-23 18:01 ` Jamison Hope
2014-07-24 3:42 ` Kumar Appaiah [this message]
2014-07-24 3:43 ` Kumar Appaiah
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140724034142.GA14862@odessa \
--to=a.kumar@alumni.iitm.ac.in \
--cc=kawa@sourceware.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).