fix some formatting issues
This commit is contained in:
parent
5726e0d9c3
commit
8eaf2e5dcc
1 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,7 @@ const none = Option.zero() // None
|
||||||
##### chain :: Option m => m a ~> (a -> m b) -> m b
|
##### chain :: Option m => m a ~> (a -> m b) -> m b
|
||||||
> Option\<T\>.chain\<U\>(fn: (value: T) -> Option\<U\>) -> Option\<U\>
|
> Option\<T\>.chain\<U\>(fn: (value: T) -> Option\<U\>) -> Option\<U\>
|
||||||
|
|
||||||
Transform a `Option\<T\>` into `Option\<U\>` by applying `fn(T) -> Option\<U\>`.
|
Transform a `Option<T>` into `Option<U>` by applying `fn(T) -> Option<U>`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const some = Option.of(1)
|
const some = Option.of(1)
|
||||||
|
@ -132,7 +132,7 @@ Represents a value which may fail.
|
||||||
##### of :: Result f => a -> f a
|
##### of :: Result f => a -> f a
|
||||||
> Result.of\<a\>(value: a) -> Result\<a, ()\>
|
> Result.of\<a\>(value: a) -> Result\<a, ()\>
|
||||||
|
|
||||||
Creates a new `Ok\<T\>` from `T`
|
Creates a new `Ok<T>` from `T`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const ok = Result.of(1) // Ok<number>(1)
|
const ok = Result.of(1) // Ok<number>(1)
|
||||||
|
@ -150,7 +150,7 @@ const err = Result.zero() // Err<()>()
|
||||||
##### chain :: Result m => m a ~> (a -> m b) -> m b
|
##### chain :: Result m => m a ~> (a -> m b) -> m b
|
||||||
> Result\<T, E\>.chain\<U\>(fn: (value: T) -> Result<U, E>) -> Result\<U, E\>
|
> Result\<T, E\>.chain\<U\>(fn: (value: T) -> Result<U, E>) -> Result\<U, E\>
|
||||||
|
|
||||||
Transform a `Result\<T, E\>` into `Result\<U, E\>` by applying `fn(T) -> Result\<U, E\>`.
|
Transform a `Result<T, E>` into `Result<U, E>` by applying `fn(T) -> Result<U, E>`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const ok = Result.of(1)
|
const ok = Result.of(1)
|
||||||
|
@ -163,7 +163,7 @@ err.chain(() => Ok(1)) // Err(0)
|
||||||
##### map :: Result f => f a ~> (a -> b) -> f b
|
##### map :: Result f => f a ~> (a -> b) -> f b
|
||||||
> Result\<T, E\>.map\<U\>(fn: (value: T) -> U) -> Result\<U, E\>
|
> Result\<T, E\>.map\<U\>(fn: (value: T) -> U) -> Result\<U, E\>
|
||||||
|
|
||||||
Transform a `Result\<T, E\>` into a `Result\<U, E\>` by applying `fn(T) -> U`
|
Transform a `Result<T, E>` into a `Result<U, E>` by applying `fn(T) -> U`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const ok = Result.of(1)
|
const ok = Result.of(1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue