[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] editorial awkwardness for syntax-rules pattern-matching
- To: scheme-reports <scheme-reports@x>
- Subject: [Scheme-reports] editorial awkwardness for syntax-rules pattern-matching
- From: Per Bothner <per@x>
- Date: Wed, 03 Sep 2014 13:43:55 -0700
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.
--
--Per Bothner
per@x http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports