Skip to content

Commit

Permalink
squash me: fix styler issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron levin committed Aug 22, 2017
1 parent 622aec2 commit f167d9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions free/src/main/scala/cats/free/Free.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ sealed abstract class Free[S[_], A] extends Product with Serializable {
): B = this match {
case Pure(a) => onPure(a)
case Suspend(a) => onSuspend(a)
case FlatMapped(c,f) => c match {
case FlatMapped(c, f) => c match {
case Pure(a) => f(a).foldStep(onPure, onSuspend, onFlatMapped)
case Suspend(a) => onFlatMapped((a,f))
case FlatMapped(fmc,fmf) =>
case Suspend(a) => onFlatMapped((a, f))
case FlatMapped(fmc, fmf) =>
fmc.flatMap(y => fmf(y).flatMap(f)).foldStep(onPure, onSuspend, onFlatMapped)
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ private trait FreeFoldable[F[_]] extends Foldable[Free[F, ?]] {

override final def foldLeft[A, B](fa: Free[F, A], b: B)(f: (B, A) => B): B =
fa.foldStep(
a => f(b,a),
a => f(b, a),
fa => F.foldLeft(fa, b)(f),
{ case (fx, g) => F.foldLeft(fx, b)((bb, x) => foldLeft(g(x), bb)(f)) }
)
Expand Down

0 comments on commit f167d9a

Please sign in to comment.