Skip to content

Instantly share code, notes, and snippets.

@stew
Created January 21, 2016 23:45
Show Gist options
  • Save stew/245037c48848f80eb5ca to your computer and use it in GitHub Desktop.
Save stew/245037c48848f80eb5ca to your computer and use it in GitHub Desktop.
runTraverseRWST.scala
def runTraverseRWST[F[_], G[_], R, W: Monoid, S, A, B](fa: F[A])(f: A => RWST[G,R,W,S,B])(r: R, s: S)(implicit F: Traverse[F], G: Monad[G]): G[(W,F[B],S)] = {
F.traverse[({type λ[α]=RWST[G,R,W,S,α]})#λ,A,B](fa)(f)(RWST.rwstMonad[G,R,W,S]).run(r,s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment