Skip to content

Instantly share code, notes, and snippets.

@negator
Last active December 10, 2015 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save negator/4366827 to your computer and use it in GitHub Desktop.
Save negator/4366827 to your computer and use it in GitHub Desktop.
An enumerator of enumerator of activities
val posts:Enumerator[List[Post]] = pagingEnumerator(postsUrl) map parseToPostList
/* parseToPostList does exactly that. Creates a list of Post objects from json*/
val activities:Enumerator[Enumerator[Activity]] = posts.map{
postList =>
Enumerator.apply(postList:_*) map buildActivity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment