[plt-scheme] discrepancy in srfi-13

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Sep 21 03:42:24 EDT 2004

Dimitry Gashinsky wrote:

> I am using srfi-13 and noticed that there is a discrepancy between
> what the spec says and the implementation.
> plt implementation says:
> string-delete char/char-set/pred string [start end]
> string-filter char/char-set/pred string [start end]
> spec at srfi.schemers.org says:
> string-filter s char/char-set/pred [start end] -> string
> string-delete s char/char-set/pred [start end] -> string
> Which one is portable to other schemes?

The reason for this is probably:
which reveals that the srfi-spec says one thing and the reference
implementation does another.

If we compare the order of arguments with
|    string-for-each| proc s [start end] -> unspecified
we see that it is common to have s and [start end] close together.
/It seems to me that this simple a typing error in the srfi spec./

Something else is fishy though. The PLT implementation says

  (define (string-filter criterion s . maybe-start+end)
    (let-string-start+end (start end) 'string-filter s maybe-start+end
      (if (procedure? criterion)

and the reference implementation says

    (define (string-filter criterion s . maybe-start+end)
      (let-string-start+end (start end) string-filter s maybe-start+end
        (if (procedure? criterion)

Why is string-filter quoted in one and not the other?

I couldn't find any mentioning of this at the post discussion list.

Jens Axel Søgaard

Posted on the users mailing list.