Function
matchPattern
(
pat: Pat,
expr: Expression,
x: Expression
)
Source from the content-addressed store, hash-verified
| 51 | /** |
| 52 | * Match `expr` against `pat`. Returns a binding environment or null. |
| 53 | * `x` is the integration variable (matches `var` patterns exactly). |
| 54 | */ |
| 55 | export function matchPattern( |
| 56 | pat: Pat, |
| 57 | expr: Expression, |
| 58 | x: Expression |
| 59 | ): Env | null { |
| 60 | const env: Env = new Map(); |
| 61 | return m(pat, expr, x, env, () => true) ? env : null; |
| 62 | } |
| 63 | |
Callers
nothing calls this directly
Tested by
no test coverage detected