Skip to content

Automated Resyntax fixes #493

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

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

Automated Resyntax fixes #493

wants to merge 2 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Mar 26, 2025

Resyntax fixed 20 issues in 1 file.

  • Fixed 13 occurrences of let-to-define
  • Fixed 7 occurrences of define-lambda-to-define

resyntax-ci bot added 2 commits March 26, 2025 00:31
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
The `define` form supports a shorthand for defining functions.
(let-values ([(x y) (ct-find main x)])
y))
subs)))
(define sorted-subs (sort subs (λ (x y) (< (left-edge-x main x) (left-edge-x main y)))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jackfirth not sure if this is a good idea, but this could potentially be refactored to (sort subs < #:key (lambda (x) (left-edge-x main x)))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sorawee That rule already exists, but it only fires in cases where no lambdas are needed. It doesn't seem clearer to me if you still need a lambda afterward.

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.

2 participants