Created
July 30, 2018 18:12
-
-
Save JorgeCastilloPrz/2f0e259b65110230c85a51068d2722a5 to your computer and use it in GitHub Desktop.
allTasksByUser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun allTasksByUser(user: User): Kind<F, List<Task>> = | |
Option.fromNullable(localCache[user]).fold( | |
{ raiseError(UserNotInLocalStorage(user)) }, | |
{ just(it) } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment