Email list hosting service & mailing list manager

One suggestion Shawn Wagner (05 Nov 2022 08:04 UTC)
Re: One suggestion Marc Nieper-Wißkirchen (05 Nov 2022 13:34 UTC)

Re: One suggestion Marc Nieper-Wißkirchen 05 Nov 2022 13:34 UTC

Dear Shawn,

thank you for taking a look at my newest SRFI.

The list-case form is without bells and whistles on purpose, so it
basically does one thing.  (Compare with the receive form of SFRI 8,
which is not as general as let-values but does the thing it was
invented for, namely receiving multiple values from a single
expression.)

Adding extra clauses to list-case would blur its origin and remove the
convenient property that the order of the clauses of the list-case
form is irrelevant.

If you need more than this basic list destructing, you can use a more
general (datum) matcher instead.  One of my subsequent SRFI proposals
will be about one.

Best wishes,

Marc

Am Sa., 5. Nov. 2022 um 09:04 Uhr schrieb Shawn Wagner
<xxxxxx@gmail.com>:
>
> An optional additional case to match a list with a single element would be nice. Something like
>
>     [(⟨variable⟩) ⟨body⟩]
>
> Sure, you could use the pair match and then see if the cdr variable is '(), but that adds a lot of noise.
>
> (I suppose this could be generalized to having n ⟨variable⟩s match a list n elements long if you want to get fancy...)