Clarification on the match clauses and catamorphisms Jani Juhani Sinervo (12 Nov 2022 17:48 UTC)
Re: Clarification on the match clauses and catamorphisms Marc Nieper-Wißkirchen (12 Nov 2022 23:00 UTC)
Re: Clarification on the match clauses and catamorphisms Marc Nieper-Wißkirchen (13 Nov 2022 11:20 UTC)

Re: Clarification on the match clauses and catamorphisms Marc Nieper-Wißkirchen 13 Nov 2022 11:20 UTC

Note added in my personal repo.

Am Sa., 12. Nov. 2022 um 23:59 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@gmail.com>:
>
> Thanks for asking!
>
> The square brackets are equivalent to parentheses.  I use both of them
> to demonstrate a good R6RS style when square and round brackets are
> available.  An R7RS programmer would just use the round parentheses.
>
> I will add a note to the text to avoid confusion.
>
> Marc
>
> Am Sa., 12. Nov. 2022 um 18:48 Uhr schrieb Jani Juhani Sinervo
> <xxxxxx@sinervo.fi>:
> >
> > So, in the spec the <clause> productions are presented as either
> >
> > ```
> > [<pattern> <body>]
> > ```
> >
> > or
> >
> > ```
> > [<pattern> (guard <guard expression ...>) <body>]
> > ```
> >
> > Alongside that, the catamorphisms in the patterns are presented as `,[var]`. My question is basically asking clarification on whether the square brackets presented are just a stylistic choice in the SRFI currently, or whether they'd be mandatory. I am asking, since of course in R6RS the brackets are already specified as being equivalent to parentheses and a significant amount of Schemes outside of that even in R7RS allow the usage of square brackets the same way.
> >
> > I feel that this should be clarified in the text, and if the square brackets were to be considered mandatory for the match clauses and catamorphisms, reconsidered.