-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs to npmignore
- Loading branch information
Ryan Stegmann
committed
Jan 29, 2017
1 parent
95d13a7
commit facce30
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
node_modules | ||
test | ||
*.spec.js | ||
docs | ||
|
||
.travis.yml | ||
.jshintignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Identity | ||
|
||
`Identity : a -> a` | ||
|
||
It's just a function which returns what you pass into it. | ||
|
||
## What a crock! | ||
|
||
It converts your `non-crock` into a `crock` | ||
|
||
```js | ||
const frozenPizza = Identity('pizza') //Identity pizza | ||
const microwave = x => 'microwave ' + x | ||
const dinner = frozenPizza.map(microwave) //Identity "microwave pizza" | ||
dinner.value() // "microwave pizza" | ||
``` | ||
|
||
| Constructor | Instance | | ||
|:---|:---| | ||
| [`of`](#of) | [`ap`](#ap), [`chain`](#chain), [`equals`](#equals), [`map`](#map), [`of`](#of), [`sequence`](#sequence), [`traverse`](#traverse), [`value`](#value) | | ||
|
||
## Constructors | ||
|
||
### of | ||
|
||
```js | ||
crocks.Identity.of([1,2,10]) | ||
crocks.Identity([1,2,10]) | ||
``` | ||
|
||
## Instances | ||
|
||
### ap | ||
|
||
`Function (a -> b) -> Function b` | ||
|
||
### chain | ||
|
||
`(a -> m b) -> m b` | ||
|
||
### equals | ||
|
||
`x -> Boolean` | ||
|
||
### map | ||
|
||
`(a -> b) -> Function b` | ||
|
||
### of | ||
|
||
`a -> Function a` | ||
|
||
### sequence | ||
|
||
`Type (m a) -> m (Type a)` | ||
|
||
### traverse | ||
|
||
`a -> Function b -> Function b` | ||
|
||
### value | ||
|
||
`a -> a` |