I now notice that the SRFI 241 pattern grammar has a surprisingly
restricted form for ellipsis list patterns. The sample implementation
supports
(⟨pattern⟩ ⟨ellipsis⟩ ⟨pattern⟩ … . ⟨pattern⟩),
but the SRFI only allows (⟨pattern⟩ ⟨ellipsis⟩ . ⟨pattern⟩).
I'm also not sure why the following syntax-rules-style patterns were
excluded from the SRFI's pattern language:
(⟨pattern⟩ … ⟨pattern⟩ ⟨ellipsis⟩ ⟨pattern⟩ …)
(⟨pattern⟩ … ⟨pattern⟩ ⟨ellipsis⟩ ⟨pattern⟩ … . ⟨pattern⟩)
It's especially glaring since
#(⟨pattern⟩ … ⟨pattern⟩ ⟨ellipsis⟩ ⟨pattern⟩ …) is a valid vector
pattern; stripping off the # yields an invalid list pattern.
At this point, I wonder whether the entire SRFI 241 pattern language
should be overhauled.
Regards, Wolf
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>