diff --git a/README.md b/README.md index 6ff355c..1531154 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ const twelve = curriedAdd(4, 4, 4) // 12 ``` ### Option -> Option = Some | None +> Option\ = Some\ | None Represents a value which may not exist. @@ -120,11 +120,26 @@ none.fold((acc, x) => x, 2) // 2 ##### isSome :: Option f => () -> boolean > Option\.isSome() -> boolean +Returns a boolean based on whether the Option is `Some` + +```js +Some(1).isSome() // true +None.isSome() // false +``` + ##### isNone :: Option f => () -> boolean > Option\.isNone() -> boolean +Returns a boolean based on whether the Option is `None` + +```js +Some(1).isNone() // false +None.isNone() // true +``` + + ### Result -> Result = Ok | Err +> Result = Ok\ | Err\ Represents a value which may fail. @@ -225,11 +240,11 @@ err.bimap( ##### isOk :: Result f => () -> boolean > Result\.isOk() -> boolean -Returns a boolean based on whether the Result is `Some` +Returns a boolean based on whether the Result is `Ok` ```js -Ok(1).isSome() // true -Err(1).isSome() // false +Ok(1).isOk() // true +Err(1).isOk() // false ``` ##### isErr :: Result f => () -> boolean