Skip to content
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

Automated Resyntax fixes #494

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Automated Resyntax fixes #494

wants to merge 11 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Apr 2, 2025

Resyntax fixed 20 issues in 4 files.

  • Fixed 6 occurrences of map-to-for
  • Fixed 2 occurrences of let-to-define
  • Fixed 2 occurrences of cond-else-if-to-cond
  • Fixed 2 occurrences of provide/contract-to-contract-out
  • Fixed 2 occurrences of for-each-to-for
  • Fixed 2 occurrences of always-throwing-if-to-when
  • Fixed 1 occurrence of nested-if-to-cond
  • Fixed 1 occurrence of unless-expression-in-for-loop-to-unless-keyword
  • Fixed 1 occurrence of for/fold-result-keyword
  • Fixed 1 occurrence of if-begin-to-cond

resyntax-ci bot added 11 commits April 2, 2025 00:15
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
The `provide/contract` form is a legacy form made obsolete by `contract-out`.
This `map` operation can be replaced with a `for/list` loop.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `for-each` operation can be replaced with a `for` loop.
Use the `#:unless` keyword instead of `unless` to reduce loop body indentation.
Only one of the `for/fold` expression's result values is used. Use the `#:result` keyword to return just that result.
Using `cond` instead of `if` here makes `begin` unnecessary
This `map` operation can be replaced with a `for/list` loop.
The `else`-`if` branch of this `cond` expression can be collapsed into the `cond` expression.
This `if`-`else` chain can be converted to a `cond` expression.
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.

0 participants