Skip to content

Commit

Permalink
add state skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Hofmann-Hicks committed Mar 2, 2017
1 parent 0d23be8 commit e717f05
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions docs/crocks/State.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# State

`State s a` / `Pair p => State s (p a s)`

--

--

```js
--
```

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

| Constructor | Instance |
|:---|:---|
| [`get`](#get), [`gets`](#gets), [`modify`](#modify), [`of`](#of), [`put`](#put), [`type`](#type) | [`ap`](#ap), [`chain`](#chain), [`evalWith`](#evalWith), [`execWith`](#execWith), [`inspect`](#inspect), [`map`](#map), [`of`](#of), [`runWith`](#runWith), [`type`](#type) |

## Constructor

### get

`State m => () -> m s s`

### gets

`State m => (s -> a) -> m s a`

### modify

`State m, Unit u => (s -> t) -> m t u`

### of

`State m => a -> m s a`

### put

`State m, Unit u => t -> m t u`

### type

`() -> String`

## Instance

### ap

`State m => m s (a -> b) ~> m s a -> m s b`

### chain

`State m => m s a ~> (a -> m s b) -> m s b`

### evalWith

`State m => m s a ~> s -> a`

### execWith

`State m => m s a ~> s -> s`

### inspect

`() -> String`

### map

`State m => m s a ~> (a -> b) -> m s b`

### of

`State m => a -> m s a`

### runWith

`State m, Pair p => m s a ~> s -> p a s`

### type

`() -> String`

0 comments on commit e717f05

Please sign in to comment.