Skip to content

Commit

Permalink
Towers: tiny refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
IR0NSIGHT committed Feb 12, 2024
1 parent a0e6f68 commit 84db43a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/effekt/benchmark/towers.effekt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def Towers() = {

def pushDisk(piles: TowerSetup, smallerDisk: SingleDisk, pileIdx: Int): StackOfDisks = {
val currentTopDisk: StackOfDisks = piles.unsafeGet(pileIdx);
(smallerDisk, currentTopDisk) match {
case (smallerSize, Cons(largerSize,_)) =>
if (smallerSize >= largerSize) {
currentTopDisk match {
case Cons(largerSize,_) =>
if (smallerDisk >= largerSize) {
panic("Cannot put a big smallerDisk on a smaller one:"++show(piles));
}
}
Expand Down

0 comments on commit 84db43a

Please sign in to comment.