Skip to content

Commit

Permalink
Fix 1 occurrence of cond-else-if-to-cond
Browse files Browse the repository at this point in the history
The `else`-`if` branch of this `cond` expression can be collapsed into the `cond` expression.
  • Loading branch information
resyntax-ci[bot] committed Jan 3, 2025
1 parent 92e7d6a commit 7406114
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
;;
;; Note: does not handle cycles but there shouldn't be any
(define (stx-equal? s1 s2)
(cond [(and (identifier? s1) (identifier? s2))
(free-identifier=? s1 s2)]
[else
(if (and (syntax? s1) (syntax? s2))
(equal?/recur (syntax-e s1) (syntax-e s2) stx-equal?)
(equal?/recur s1 s2 stx-equal?))]))
(cond
[(and (identifier? s1) (identifier? s2)) (free-identifier=? s1 s2)]
[(and (syntax? s1) (syntax? s2)) (equal?/recur (syntax-e s1) (syntax-e s2) stx-equal?)]
[else (equal?/recur s1 s2 stx-equal?)]))

(struct simple-contract static-contract (syntax kind name)
#:transparent
Expand Down

0 comments on commit 7406114

Please sign in to comment.