Created
March 23, 2022 17:16
-
-
Save 1gravity/e234aca0ccde464286f380fb4dc02e8c to your computer and use it in GitHub Desktop.
Functional Kotlin Example
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
binding { | |
val postData = networkDataSource.getPost(id).bind() | |
val comments = networkDataSource.getComments().bind() | |
.filter { comment -> comment.postId == postData.id } | |
PostDetail( | |
postData.id, | |
postData.body, | |
comments.map { PostComment(it.id, it.name, it.email, it.body) } | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment