Skip to content

Automated Resyntax fixes #1452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 27, 2025
Merged

Automated Resyntax fixes #1452

merged 17 commits into from
May 27, 2025

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented May 23, 2025

Resyntax fixed 50 issues in 20 files.

  • Fixed 14 occurrences of single-clause-match-to-match-define
  • Fixed 9 occurrences of let-to-define
  • Fixed 5 occurrences of define-lambda-to-define
  • Fixed 4 occurrences of cond-let-to-cond-define
  • Fixed 3 occurrences of let-values-then-call-to-call-with-values
  • Fixed 2 occurrences of map-to-for
  • Fixed 2 occurrences of syntax-disarm-migration
  • Fixed 2 occurrences of cond-else-if-to-cond
  • Fixed 2 occurrences of if-else-false-to-and
  • Fixed 1 occurrence of quasiquote-to-list
  • Fixed 1 occurrence of define-simple-macro-to-define-syntax-parse-rule
  • Fixed 1 occurrence of for/fold-result-keyword
  • Fixed 1 occurrence of equal-null-list-to-null-predicate
  • Fixed 1 occurrence of append*-and-map-to-append-map
  • Fixed 1 occurrence of always-throwing-if-to-when
  • Fixed 1 occurrence of inverted-when

resyntax-ci bot added 17 commits May 23, 2025 00:49
This `match` expression can be simplified using `match-define`.
The `define-simple-macro` form has been renamed to `define-syntax-parse-rule`.
The `null?` predicate can be used to test for the empty list.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
The `define` form supports a shorthand for defining functions.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `let-values` expression can be replaced with a simpler, equivalent `call-with-values` expression.
This negated `when` expression can be replaced by an `unless` expression.
The `syntax-disarm` function is a legacy function that does nothing.
This `if` expression can be refactored to an equivalent expression using `and`.
This `map` operation can be replaced with a `for/list` loop.
Only one of the `for/fold` expression's result values is used. Use the `#:result` keyword to return just that result.
The `append-map` function can be used to map each element into multiple elements in a single pass.
The `else`-`if` branch of this `cond` expression can be collapsed into the `cond` expression.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
This quasiquotation is equialent to a simple `list` call.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
@samth samth merged commit 4094b10 into master May 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant