We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bd2fe7 commit edfaa1aCopy full SHA for edfaa1a
lean/ClockHands.lean
@@ -1,8 +1,8 @@
1
def printTimes : List (IO Unit) → IO Unit
2
| [] => pure ()
3
- | act :: actions => do
4
- printTimes actions
5
- act
+ | doPrint :: printStatements => do
+ printTimes printStatements
+ doPrint
6
7
def pad : Nat → String
8
| n + 10 => s!"{n + 10}"
@@ -13,6 +13,6 @@ def clock (t : Nat) : String :=
13
14
def countdown : Nat → List (IO Unit)
15
| 0 => []
16
- | n + 1 => IO.println (clock ((43200 * (n) + 21600) / 11)) :: countdown n
+ | i + 1 => IO.println (clock ((43200 * i + 21600) / 11)) :: countdown i
17
18
def main : IO Unit := printTimes (countdown 11)
0 commit comments