Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StateT transformS #780

Merged
merged 2 commits into from
Jan 6, 2016
Merged

Conversation

adelbertc
Copy link
Contributor

No description provided.

@codecov-io
Copy link

Current coverage is 88.48%

Merging #780 into master will increase coverage by +0.01% as of 4f48ae8

@@            master    #780   diff @@
======================================
  Files          166     166       
  Stmts         2291    2292     +1
  Branches        75      75       
  Methods          0       0       
======================================
+ Hit           2027    2028     +1
  Partial          0       0       
  Missed         264     264       

Review entire Coverage Diff as of 4f48ae8

Powered by Codecov. Updated on successful CI builds.

@milessabin
Copy link
Member

👍

@@ -73,6 +73,20 @@ final class StateT[F[_], S, A](val runF: F[S => F[(S, A)]]) extends Serializable
def transformF[G[_], B](f: F[(S, A)] => G[(S, B)])(implicit F: FlatMap[F], G: Applicative[G]): StateT[G, S, B] =
StateT(s => f(run(s)))

/** Transform the state used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unjustifiably nitpicky: could you bump "Transform..." down to the next line to be consistent with the other ScalaDoc comments?

Also, what do you think about adding an sbt-doctest example here?

* scala> xt.run((input, "hello"))
* res1: Option[(GlobalEnv, Double)] = Some(((6,hello),5.0))
* }}}
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it.

@ceedubs
Copy link
Contributor

ceedubs commented Jan 6, 2016

👍

ceedubs added a commit that referenced this pull request Jan 6, 2016
@ceedubs ceedubs merged commit 1f8977b into typelevel:master Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants