Skip to content

Commit 01f8c11

Browse files
Fix 1 occurrence of if-begin-to-cond
Using `cond` instead of `if` here makes `begin` unnecessary
1 parent d372973 commit 01f8c11

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

typed-racket-test/optimizer/transform.rkt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@
3333
(for ((entry new-tr-log))
3434
(write-stringln entry))
3535
(write-stringln "END")
36-
(if (regexp-match "\n" new-output)
37-
(begin
38-
(write-stringln "#<<END")
39-
(write-stringln new-output)
40-
(write-stringln "END"))
41-
(begin
42-
(write new-output)))
36+
(cond
37+
[(regexp-match "\n" new-output)
38+
(write-stringln "#<<END")
39+
(write-stringln new-output)
40+
(write-stringln "END")]
41+
[else (write new-output)])
4342
(write-string source-code))))
4443

4544
;; proc returns the list of tests to be run on each file

0 commit comments

Comments
 (0)