From 4a6f29f497cc50fbbf54de0d028ec528767db9ab Mon Sep 17 00:00:00 2001 From: Roberto Previdi Date: Sat, 12 Jun 2021 16:20:24 +0200 Subject: [PATCH] Update exercise_b.js I lost a couple of hours because I was guessing that findUserById would return just an `Either Error User`, but then I found out that it returns a Task of that! --- exercises/ch11/exercise_b.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/ch11/exercise_b.js b/exercises/ch11/exercise_b.js index 87091354..074b5f15 100644 --- a/exercises/ch11/exercise_b.js +++ b/exercises/ch11/exercise_b.js @@ -2,6 +2,7 @@ // // // eitherToTask :: Either a b -> Task a b // const eitherToTask = either(Task.rejected, Task.of); - -// findNameById :: Number -> Task Error (Either Error User) +// // findUserById :: Number -> Task Error (Either Error User) +// const findUserById = ... +// const findNameById = compose(map(map(prop('name'))), findUserById);