Skip to content

Commit

Permalink
fix: terminate code block
Browse files Browse the repository at this point in the history
  • Loading branch information
Gipphe committed Aug 4, 2018
1 parent 8e0ab44 commit 4c60905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ Like `caseOf`, this function throws if none of the cases match.
. when (x => x > 3) (x => x)
. }) (0)
! Error None of the cases matches the value
```

### <a name="caseOf" href="'https://github.com/Gipphe/caseof/blob/master/index.js#L188'">`caseOf :: ((a -⁠> Boolean) -⁠> (a -⁠> b) -⁠> Undefined) -⁠> a -⁠> b`</a>
### <a name="caseOf" href="'https://github.com/Gipphe/caseof/blob/master/index.js#L189'">`caseOf :: ((a -⁠> Boolean) -⁠> (a -⁠> b) -⁠> Undefined) -⁠> a -⁠> b`</a>

Returns the result of the first matching case. This function is lazy, and
only the first matching handler is run.
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ function otherwise() {
//. . when (x => x > 3) (x => x)
//. . }) (0)
//. ! Error None of the cases matches the value
//. ```
function caseOfAll(specFn, x) {
assertIsNotPassedThrowWithDefaultMessage (x, 'caseOfAll');
assertIsFunctionWithMsg (specFn);
Expand Down

0 comments on commit 4c60905

Please sign in to comment.