Skip to content

append-map with for/list body #323

@jackfirth

Description

@jackfirth

In racket/scribble#441, Resyntax missed an opportunity to perform this simplification:

#lang resyntax/private/refactoring-test

--------------------
#lang racket
(append-map (lambda (m)
              (for/list ([u (in-list (mapping-get chunk-groups m))])
                (list (syntax-local-introduce m) (syntax-local-introduce u))))
            chunk-mentions)
--------------------
--------------------
#lang racket
(for*/list ([m (in-list chunk-mentions)]
            [u (in-list (mapping-get chunk-groups m))])
  (list (syntax-local-introduce m) (syntax-local-introduce u)))
--------------------

It would be handy to have a rule for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new lintIssues suggesting new lints or pull requests implementing new lints

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions