Changes between Version 13 and Version 14 of ViewPatterns
- Timestamp:
- 01/25/07 00:57:35 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ViewPatterns
v13 v14 123 123 }}} 124 124 Here the first argument `p` can be thought of as a pattern passed to `g`, which 125 is used to match the second argument of `g`. 125 is used to match the second argument of `g`. 126 127 Here is another rather cute example: 128 {{{ 129 unfoldr :: (b -> Maybe (a, b)) -> b -> [a] 130 unfoldr f (f -> (a, b)) = a : unfoldr f b 131 unfoldr f other = [] 132 }}} 126 133 127 134 === Possible extension 1: multi-argument view patterns ===
