Changes between Version 14 and Version 15 of ViewPatterns


Ignore:
Timestamp:
Jan 25, 2007 9:02:28 AM (9 years ago)
Author:
simonpj
Comment:

Add extension 1b

Legend:

Unmodified
Added
Removed
Modified
  • ViewPatterns

    v14 v15  
    186186Here `even` is used as a nullary view pattern, with no sub-patterns
    187187following the `->`.
     188
     189Another variation (call it "extension 1b"), which avoids the tiresome need to define new types, is this: supplying multiple sub-patterns in a view pattern is synonymous with tupling.  Thus `(f -> p1 p2)` would be synonymous with `(f -> (p1,p2))`.  Here the effect is purely syntactic, allowing you to omit parens and commas without confusion.  No new types.  The power-to-weight ratio is probably better for this alternative.
    188190
    189191=== Possible extension 2: the implicit `Maybe`  ===