What is catamorphism? Why is this SRFI stalled?
Amirouche 02 Dec 2021 11:19 UTC
A) What is a catamorphism?
B) What is required to move this SRFI forward?
I like the specification. Tho, there is something unclear. The specified (recommended?)
pattern matching language is the one found inside the section:
Quasi-quotation is the preferred way of expressing patterns
Where the following grammar appears:
pat ::= identifier anything, and binds identifier
| _ anything
| () the empty list
| #t #t
| #f #f
| string a string
| number a number
| character a character
| 'sexp an s-expression
| 'symbol a symbol (special case of s-expr)
| `qp a quasi-pattern
quasi-patterns: matches:
qp ::= () the empty list
| #t #t
| #f #f
| string a string
| number a number
| character a character
| identifier a symbol
| (qp_1 ... qp_n) list of n elements
| (qp_1 ... qp_n . qp_{n+1}) list of n or more
of remainder must match qp_n+1
| ,pat a pattern
I think there is mistake with the pat production rule
for the empty list. An empty list is '(). Do I miss something?