[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SRFI 41 for Guile

From: Chris K. Jester-Young
Subject: SRFI 41 for Guile
Date: Tue, 6 Dec 2011 14:37:28 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Hi all,

Just writing to say that after many months of being busy with other
stuff, I finally got around to finishing my Guile port of SRFI 41:

Basically, both the code and the tests are based on the reference
implementation, albeit with somewhat significant changes (as Andreas
Rottmann pointed out ;-)) to make better use of Guile's features:

+ The tests use Guile's (test-suite lib) test framework.

+ define*/lambda* is used for handling optional arguments, rather than
  manual argument unpacking. In the odd case of stream->list where the
  optional argument is the leftmost one, I used case-lambda instead.

+ Guile's SRFI 45 is used directly, rather than reimplemented as in the
  reference implementation.

+ stream-match and stream-unfolds are complete rewrites. stream-match
  uses (ice-9 match), and stream-unfolds uses (ice-9 q) to store the
  unread results.

+ stream-constant uses circular-list to hold the values of interest,
  rather than...whatever the reference implementation does with append
  (see for yourself, if you're curious ;-)).

The long and short is that whatever functionality is covered by an
existing Guile module or builtin feature, I tried to make the best use
of it. Still, I don't know every Guile module there is, so if I missed
something, please let me know!

Before anyone asks, though, I can't use (ice-9 streams)---it works on
a very different streaming model from SRFI 41, as explained in the
latter's introduction.

Comments are very welcome. :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]