Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-adam committed May 15, 2024
1 parent 2cbd43b commit c36d5d9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ object Constants {

def appK(a: CombinatorBT): Node[Combinator] = Node(kCom, a)

def app4(c1: CombinatorBT, c2: CombinatorBT, c3: CombinatorBT, c4: CombinatorBT): CombinatorBT = Node(c1, app3(c2, c3, c4))
def app4(c1: CombinatorBT, c2: CombinatorBT, c3: CombinatorBT, c4: CombinatorBT): CombinatorBT = Node(app3(c1, c2, c3), c4)

def app3(c1: CombinatorBT, c2: CombinatorBT, c3: CombinatorBT): CombinatorBT = Node(c1, Node(c2, c3))
def app3(c1: CombinatorBT, c2: CombinatorBT, c3: CombinatorBT): CombinatorBT = Node(Node(c1, c2), c3)

def com(c: Combinator): CombinatorBT = Leaf(c)

}

0 comments on commit c36d5d9

Please sign in to comment.