Skip to content
GitLab
Explore
Sign in
Register
Glasgow Haskell Compiler
GHC
Wiki
view patterns
view patterns
· Changes
Page history
Edit ViewPatterns
authored
Feb 12, 2016
by
Alexey Kuleshevich
Show whitespace changes
Inline
Side-by-side
view-patterns.md
View page @
fc117dc0
...
@@ -252,7 +252,7 @@ This parses 3 bits to get the value of `n`, and then parses `n` bits to get the
...
@@ -252,7 +252,7 @@ This parses 3 bits to get the value of `n`, and then parses `n` bits to get the
They are used as follows:
They are used as follows:
```
wiki
```
wiki
fib :: Num a
-
> a -> a
fib :: Num a
=
> a -> a
fib 0 = 1
fib 0 = 1
fib 1 = 1
fib 1 = 1
fib (np 2 -> Just n) = fib (n + 1) + fib n
fib (np 2 -> Just n) = fib (n + 1) + fib n
...
...