rogerburtonpatel / vml

Code and proofs for Verse-ML, an equation-style sub-ml language. Part of an undergraduate senior thesis with Norman Ramsey, Milod Kazerounian, and Roger Burtonpatel.
5 stars 0 forks source link

Discussion point: Verse can bind where or-patterns cannot #31

Open nrnrnr opened 6 months ago

nrnrnr commented 6 months ago

Using Verse (or V-minus), it is easy to have a pattern that says, e.g., "If list xs is nonempty, then bind x to the first element, otherwise bind x to zero." Can this be done with or-patterns? How about a combination of or-patterns and pattern guards? Or other extensions?

This scenario could form a useful point of comparison for the manuscript.