Skip to content

Instantly share code, notes, and snippets.

@tomaszperek
Created October 10, 2015 11:34
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 tomaszperek/4499aa2f4ec1d7136e9d to your computer and use it in GitHub Desktop.
Save tomaszperek/4499aa2f4ec1d7136e9d to your computer and use it in GitHub Desktop.
Zip implementation
def zip[P <: Product, In <: HList, Out <: HList]
(p: P)
(implicit gen: Generic.Aux[P, In], ev: IsHListOfFutures[In, Out], tupler: Tupler[Out], ec: ExecutionContext) = {
hsequence(gen.to(p)).map(_.tupled)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment