Skip to content

match-lambda from (chibi match) (? ...) defines guard for every match #1088

@SirDroun

Description

@SirDroun

when using a guard in a match-lambda expression i expect the guard to be defined once, when i define the pattern, and not every time the procedure the match-lambda defines is called. The guard should be part of the closure created by the match-lambda. A simple example:

(map (match-lambda* (((? (begin (display 'a)(newline)(lambda (x) #t)) x) x))(y y)) '(1 2 3 4))
a
a
a
a
((1) (2) (3) (4))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions