[plt-scheme] Reimplementation of srfi-26 (cut and cute)
Lauri Alanko wrote:
> On Wed, Jul 20, 2005 at 09:40:04PM +0200, Jens Axel Søgaard wrote:
>
>>Attached is a reimplementation of srfi-26 with
>>better error messages than the original.
>
>
> I just tried this out, and found that the reimplementation does not
> follow the spec. The SRFI allows a <slot-or-expr> as the first argument
> to cut or cute, hence making a slot at the operator position perfectly
> legal.
You are absolutely right. This is bug 7824:
<http://bugs.plt-scheme.org/>
Which also has a fix - but someone needs to check the
code, and then commit it to SVN.
The test suite for the reference implementation didn't
have any tests for <> in the first position, so somehow
I missed it that case.
> I also removed the special error handling for (cut <...> ...). Whether
> it even should be an error is arguable, and if it should, then the
> macro should check _all_ non-tail occurrences of <...>, not just at
> the operator position.
The grammar in the specification doesn't allow <...> in the
first position, so why not check for that?
--
Jens Axel Søgaard