Skip to content

Commit

Permalink
two-bucket: PascalCase for types
Browse files Browse the repository at this point in the history
  • Loading branch information
siebenschlaefer committed Feb 27, 2024
1 parent f3693de commit 859f7d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/two-bucket/.meta/example.nim
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
type
measureResult* = tuple
MeasureResult* = tuple
possible: bool
moves: int
goalBucket: string
otherBucket: int

proc measure*(bucket1, bucket2, goal: int, startBucket: string): measureResult =
proc measure*(bucket1, bucket2, goal: int, startBucket: string): MeasureResult =
if startBucket == "two":
result = measure(bucket2, bucket1, goal, "one")
result.goalBucket = if result.goalBucket == "one": "two" else: "one"
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/two-bucket/two_bucket.nim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
type
measureResult* = tuple
MeasureResult* = tuple
possible: bool
moves: int
goalBucket: string
otherBucket: int

proc measure*(bucket1, bucket2, goal: int, startBucket: string): measureResult =
proc measure*(bucket1, bucket2, goal: int, startBucket: string): MeasureResult =
discard

0 comments on commit 859f7d3

Please sign in to comment.