Skip to content
GitLab
Explore
Sign in
Register
Glasgow Haskell Compiler
GHC
Wiki
view patterns
view patterns
· Changes
Page history
fix Set insert
authored
Jul 23, 2007
by
Simon Marlow
Hide whitespace changes
Inline
Side-by-side
view-patterns.md
View page @
faa91a89
...
...
@@ -204,8 +204,8 @@ module Set(Set, empty, insert, delete, has) where
delete x s = s
insert :: a -> Set a -> Set a
insert x s@(has x -> _) = s
insert x (S xs) = S (x:xs)
insert x s@(has x ->
Just
_) = s
insert x (S xs)
= S (x:xs)
```
...
...