From 6e39eb2d4ac0b526624167f32349a343b1dd527b Mon Sep 17 00:00:00 2001 From: Joan Llenas Date: Tue, 25 Sep 2018 08:35:40 +0200 Subject: [PATCH] Documentation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 323320f..d2c2f6c 100644 --- a/README.md +++ b/README.md @@ -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')) @@ -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' ```