Skip to content

Commit

Permalink
Merge pull request #3225 from djspiewak/feature/foldstep
Browse files Browse the repository at this point in the history
Publicize Free#foldStep
  • Loading branch information
djspiewak committed Dec 31, 2019
2 parents f44f251 + e814bf7 commit 371fe73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions free/src/main/scala/cats/free/Free.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ sealed abstract class Free[S[_], A] extends Product with Serializable {
}

/**
* A combination of step and fold.
* A combination of step and fold. May be used to define interpreters with custom
* (non-monoidial) control flow.
*/
final private[free] def foldStep[B](
final def foldStep[B](
onPure: A => B,
onSuspend: S[A] => B,
onFlatMapped: ((S[X], X => Free[S, A]) forSome { type X }) => B
Expand Down

0 comments on commit 371fe73

Please sign in to comment.