Construct a new computation using the provided function.
Like apply, but using a function in a context F
.
Get the provided environment, without modifying the input state.
Get the provided environment, without modifying the input state.
Return the input state without modifying it.
Return the input state without modifying it.
Inspect a value from the input state, without modifying the state.
Inspect a value from the input state, without modifying the state.
Like inspect, but using an effectful function.
Like inspect, but using an effectful function.
Return an effectful a
and an empty log without modifying the input state.
Return an effectful a
and an empty log without modifying the input state.
Same as liftF, but expressed as a FunctionK for use with mapK
Same as liftF, but expressed as a FunctionK for use with mapK
scala> import cats._, data._, implicits._ scala> val a: OptionT[Eval, Int] = 1.pure[OptionT[Eval, ?]] scala> val b: OptionT[RWST[Eval, Boolean, List[String], String, ?], Int] = a.mapK(RWST.liftK) scala> b.value.runEmpty(true).value res0: (List[String], String, Option[Int]) = (List(),"",Some(1))
Modify the input state using f
.
Like modify, but using an effectful function.
Return a
and an empty log without modifying the input state.
Return a
and an empty log without modifying the input state.
Set the state to s
.
Set the state to s
.
Like set, but using an effectful S
value.
Like set, but using an effectful S
value.
Add a value to the log, without modifying the input state.
Add a value to the log, without modifying the input state.
Like tell, but using an effectful L
value.
Like tell, but using an effectful L
value.
(Since version 1.0.0-RC2) Use liftF instead