Changes between Version 1 and Version 2 of ViewPatterns


Ignore:
Timestamp:
Jan 24, 2007 3:30:14 PM (7 years ago)
Author:
malcolm.wallace@…
Comment:

another concrete syntax option: (pat <- expr)

Legend:

Unmodified
Added
Removed
Modified
  • ViewPatterns

    v1 v2  
    257257  has :: Eq a => a -> Set a -> Maybe (Set a) 
    258258  has x (S xs) | x `elem` xs = Just (xs \\ x) 
    259                    | otherwise   = Nothing 
     259               | otherwise   = Nothing 
    260260   
    261261  delete :: a -> Set a -> Set a 
     
    318318  f (snoc | x xs) = ..          -- Use "|" instead of "->" 
    319319  g (bits 3 | b bs) = ... 
     320 
     321  f ((x,xs) <- snoc) = ...  -- More like pattern guards 
    320322}}} 
    321323