Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

formatting for post

  • Loading branch information...
commit b9e3ec5da44bb4cc7f85e99ee7c5fd55033de8d9 1 parent 9845d9c
@jaked authored
Showing with 14 additions and 7 deletions.
  1. +14 −7 _code/scala-logic/LogicSFKDefuncTailrec.scala
View
21 _code/scala-logic/LogicSFKDefuncTailrec.scala
@@ -38,11 +38,16 @@ object LogicSFKDefuncTailrec extends Logic {
i match {
case Fail() => apply(fk, null, null, null, null, k)
case Unit(a) => apply(sk, a, null, null, fk, k)
- case Or(t1, t2) => apply(t1, null, null, sk, FKOr(t2, sk, fk), k)
- case Bind(t, f) => apply(t, null, null, SKBind(f, sk), fk, k)
- case Apply(t, f) => apply(t, null, null, SKApply(f, sk), fk, k)
- case Filter(t, p) => apply(t, null, null, SKFilter(p, sk), fk, k)
- case Unsplit(fk2) => apply(fk2, null, null, null, null, KUnsplit(sk, fk, k))
+ case Or(t1, t2) =>
+ apply(t1, null, null, sk, FKOr(t2, sk, fk), k)
+ case Bind(t, f) =>
+ apply(t, null, null, SKBind(f, sk), fk, k)
+ case Apply(t, f) =>
+ apply(t, null, null, SKApply(f, sk), fk, k)
+ case Filter(t, p) =>
+ apply(t, null, null, SKFilter(p, sk), fk, k)
+ case Unsplit(fk2) =>
+ apply(fk2, null, null, null, null, KUnsplit(sk, fk, k))
case FKOr(t, sk, fk) => apply(t(), null, null, sk, fk, k)
case FKSplit(r) => apply(k, null, r, null, null, null)
@@ -54,13 +59,15 @@ object LogicSFKDefuncTailrec extends Logic {
apply(sk, a, null, null, fk, k)
else
apply(fk, null, null, null, null, k)
- case SKSplit(rf) => apply(k, null, rf(a, fk), null, null, null)
+ case SKSplit(rf) =>
+ apply(k, null, rf(a, fk), null, null, null)
case KReturn => r
case KUnsplit(sk, fk, k) => {
r match {
case None => apply(fk, null, null, null, null, k)
- case Some((a, t)) => apply(or(unit(a), t), null, null, sk, fk, k)
+ case Some((a, t)) =>
+ apply(or(unit(a), t), null, null, sk, fk, k)
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.