Skip to content

Commit

Permalink
add async api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Hofmann-Hicks committed Mar 1, 2017
1 parent 3290795 commit c2ebd7a
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 8 deletions.
96 changes: 96 additions & 0 deletions docs/crocks/Async.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Async

`Async c a`

--

--

```js
--
```

`Async` exposes the following functions on the constructor and instance:

| Constructor | Instance |
|:---|:---|
| [`Rejected`](#rejected), [`Resolved`](#resolved), [`all`](#all), [`fromNode`](#fromnode), [`fromPromise`](#frompromise), [`of`](#of), [`type`](#type) | [`alt`](#alt), [`ap`](#ap), [`bimap`](#bimap), [`chain`](#chain), [`coalesce`](#coalesce), [`fork`](#fork), [`inspect`](#inspect), [`map`](#map), [`of`](#of), [`swap`](#swap), [`toPromise`](#topromise), [`type`](#type) |

## Constructor

### Rejected

`Async m => c -> m c _`

### Resolved

`Async m => a -> m _ a`

### all
`Async m, Foldable f => f (m c a) -> m c (f a)`

### fromNode

`Async m, CPSFunc f, Context ctx => (f, ctx) -> (* -> m c a)`

### fromPromise

`Async m, Promise p => (* -> p a c) -> (* -> m c a)`

### of

`Async m => a -> m _ a`

### type

`() -> String`

## Instance

### alt

`Async m => m c a ~> m c a -> m c a`

### ap

`Async m => m c (a -> b) ~> m c a -> m c b`

### bimap

`Async m => m c a ~> ((c -> d), (a -> b)) -> m d b`

### chain

`Async m => m c a ~> (a -> m c b) -> m c b`

### coalesce

`Async m => m c a ~> ((c -> b), (a -> b)) -> m _ b`

### fork

`Async m => m c a ~> ((c -> ()), (a -> ())) -> ()`

### inspect

`() -> String`

### map

`Async m => m c a ~> (a -> b) -> m c b`

### of

`Async m => a -> m _ a`

### swap

`Async m => m c a ~> ((c -> d), (a -> b)) -> m b d`

### toPromise

`Async m, Promise => m c a ~> () -> p a c`

### type

`() -> String`
8 changes: 4 additions & 4 deletions docs/crocks/Either.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@

### bimap

`Either m => m c a ~> (c -> d) -> (a -> b) -> m d b`
`Either m => m c a ~> ((c -> d), (a -> b)) -> m d b`

### chain

`Either m => m c a ~> (a -> m c b) -> m c b`

### coalesce

`Either m => m c a ~> (c -> b) -> (a -> b) -> m _ b`
`Either m => m c a ~> ((c -> b), (a -> b)) -> m _ b`

### concat

`Either m, Semigroup a => m c a ~> m c a -> m c a`

### either

`Either m => m c a ~> (c -> b) -> (a -> b) -> b`
`Either m => m c a ~> ((c -> b), (a -> b)) -> b`

### equals

Expand All @@ -86,7 +86,7 @@

### swap

`Either m => m c a ~> (c -> d) -> (a -> b) -> m b d`
`Either m => m c a ~> ((c -> d), (a -> b)) -> m b d`

### traverse

Expand Down
4 changes: 2 additions & 2 deletions docs/crocks/Maybe.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@

### coalesce

`Maybe m => m a ~> (() -> b) -> (a -> b) -> m b`
`Maybe m => m a ~> ((() -> b), (a -> b)) -> m b`

### concat

`Maybe m, Semigroup a => m a ~> m a -> m a`

### either

`Maybe m => m a ~> (() -> b) -> (a -> b) -> b`
`Maybe m => m a ~> ((() -> b), (a -> b)) -> b`

### equals

Expand Down
4 changes: 2 additions & 2 deletions docs/crocks/Pair.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

### bimap

`Pair m => m c a ~> (c -> d) -> (a -> b) -> m d b`
`Pair m => m c a ~> ((c -> d), (a -> b)) -> m d b`

### chain

Expand Down Expand Up @@ -70,4 +70,4 @@

### swap

`Pair m => m c a ~> (c -> d) -> (a -> b) -> m b d`
`Pair m => m c a ~> ((c -> d), (a -> b)) -> m b d`

0 comments on commit c2ebd7a

Please sign in to comment.