basic hierarchy in place

This commit is contained in:
Stephen Diehl
2016-12-10 12:46:48 +00:00
parent c28fa6b00c
commit b32c80d0bb
11 changed files with 261 additions and 146 deletions
+98
View File
@@ -0,0 +1,98 @@
Functions
=========
Composition
-----------
#### $
```haskell
($) :: (a -> b) -> a -> b
```
*Example*:
#### .
```haskell
(.) :: (b -> c) -> (a -> b) -> a -> c
```
*Example*:
#### &
```haskell
(&) :: a -> (a -> b) -> b
```
*Example*:
#### flip
```haskell
flip :: (a -> b -> c) -> b -> a -> c
```
*Example*:
#### on
```haskell
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
```
*Example*:
#### const
```haskell
const :: a -> b -> a
```
*Example*:
#### fix
```haskell
fix :: (a -> a) -> a
```
*Example*:
#### identity
```haskell
identity :: a -> a
```
The identity function maps any value to itself.
*Example*:
Strictness
-----------
#### $!
```haskell
($!) :: NFData a => (a -> b) -> a -> b
```
*Example*:
#### $!!
```haskell
($!!) :: NFData a => (a -> b) -> a -> b
```
*Example*:
#### force
```haskell
force :: NFData a => a -> a
```
*Example*: