Support for numeric indices and ranges #3

Open
opened 2017-01-27 12:22:51 +00:00 by SuzanneSoy · 0 comments
SuzanneSoy commented 2017-01-27 12:22:51 +00:00 (Migrated from github.com)
(syntax-case #'(a b c d e) ()
  [(xᵢ ...)
   (subtemplate (#:zero yᵢ₌₀ #:one-end yᵢ₌₁₊ #:two-five yᵢ₌₂₋₅) ]

Also support it for bound variables, e.g. xᵢ₌₁.

We could allow inferring the subscript for already-bound variables, and for derived variables which are otherwise mentioned (and for derived variables when there is only a single subscript within scope), as long as there is no ambiguity. But the form vᵢ₌ is preferred, as there is less risk of introducing ambiguities by adding new pattern variables.

``` (syntax-case #'(a b c d e) () [(xᵢ ...) (subtemplate (#:zero yᵢ₌₀ #:one-end yᵢ₌₁₊ #:two-five yᵢ₌₂₋₅) ] ``` Also support it for bound variables, e.g. `xᵢ₌₁`. We could allow inferring the subscript for already-bound variables, and for derived variables which are otherwise mentioned (and for derived variables when there is only a single subscript within scope), as long as there is no ambiguity. But the form `vᵢ₌` is preferred, as there is less risk of introducing ambiguities by adding new pattern variables.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: suzanne.soy/subtemplate#3
No description provided.