Skip to content

Instantly share code, notes, and snippets.

@joan38
Created May 19, 2018 19:11
Show Gist options
  • Select an option

  • Save joan38/7d43ae2cf428757af7a6c7b58c446e7a to your computer and use it in GitHub Desktop.

Select an option

Save joan38/7d43ae2cf428757af7a6c7b58c446e7a to your computer and use it in GitHub Desktop.
...
.join(likesByKey,
(denormalisedPost: DenormalisedPost, likes: Set[Like]) =>
denormalisedPost.lens(_.interactions.likes).set(likes))
.join(commentCountByKey,
(denormalisedPost: DenormalisedPost, commentCount: Int) =>
denormalisedPost.lens(_.interactions.comments).set(commentCount))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment