https://kotlinlang.org logo
#arrow
Title
s

Sergio Crespo Toubes

02/26/2019, 3:34 PM
my code is like this
Copy code
GlobalScope.launch(Dispatchers.Main) {
    withContext(Dispatchers.Default) {
        mBooksService.getBooksService(authToken)
    }.foldRight(Eval.Unit) { books, eval ->
        if (books.isEmpty()) {
            mView.hideBooksList()
        } else {
            mView.showBooksList(books)
        }
        eval
    }
}