Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
joanllenas committed Sep 25, 2018
1 parent 68aebe4 commit 6e39eb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const head = (arr: number[]): number => {
// successful operation
let wrappedValue = map(head, right([99, 109, 22, 65])); // Right(100)
let num = withDefault(wrappedValue, 0); // unwrap the value from Either
console.log(num); // 100
console.log(num); // 99

// failing operation
wrappedValue = map(head, right([])); // Left(Error('Array is empty'))
Expand Down Expand Up @@ -147,5 +147,5 @@ const result = andThen(
arr => andThen(arr2 => removeFirstLifted(arr2), removeFirstLifted(arr)),
removeFirstLifted(['a', 'b'])
);
withDefault(result, ['default val']); // 'default val'
withDefault(result, 'default val'); // 'default val'
```

0 comments on commit 6e39eb2

Please sign in to comment.