Per Bothner
2014-09-03 20:43:55 UTC
If there is a revision or successor to r7rs, I suggest changing the really
awkward specification of syntax-rules pattern-matching with ellipsis in 4.3.2:
For example:
P is of the form (P_1 . . . P_k P_e ellipsis P_m+1 ... P_n)
where E is a proper list of n elements, the first
k of which match P_1 through P_k , respectively, whose
next m−k elements each match P_e, whose remaining
n−m elements match P_m+1 through P_n
The phrase 'of the form (P_1 ... P_k P_e ellipsis P_m+1 ... P_n)'
doesn't really make sense since m and n come out of nowhere.
Much clearer to write:
P is of the form (P_1 . . . P_k P_e ellipsis P_k+1 ... P_k+l)
where E is a proper list of n elements, the first
k of which match P_1 through P_k , respectively, whose
next n−k-l elements each match P_e, whose remaining
l elements match P_k+1 through P_k+l
Similarly for other items.
awkward specification of syntax-rules pattern-matching with ellipsis in 4.3.2:
For example:
P is of the form (P_1 . . . P_k P_e ellipsis P_m+1 ... P_n)
where E is a proper list of n elements, the first
k of which match P_1 through P_k , respectively, whose
next m−k elements each match P_e, whose remaining
n−m elements match P_m+1 through P_n
The phrase 'of the form (P_1 ... P_k P_e ellipsis P_m+1 ... P_n)'
doesn't really make sense since m and n come out of nowhere.
Much clearer to write:
P is of the form (P_1 . . . P_k P_e ellipsis P_k+1 ... P_k+l)
where E is a proper list of n elements, the first
k of which match P_1 through P_k , respectively, whose
next n−k-l elements each match P_e, whose remaining
l elements match P_k+1 through P_k+l
Similarly for other items.
--
--Per Bothner
***@bothner.com http://per.bothner.com/
--Per Bothner
***@bothner.com http://per.bothner.com/