FluxML / FluxML/MacroTools.jl

minor clarification for matching pairs (documentation)

Open
#29 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
320
Forks
84
PR merge metrics
No merged PRs in 30d

Description

In retrospect it is pretty obvious, but I needed to look up the associativity of `=>` to figure out how to match `Pair(x,y)` expressions, ie
```julia
@match :(a => b) begin
(x_ => y_) => (x,y) # need parentheses
_ => :unmatched
end
```
where `x_ => y_ => (x,y)` won't work because it is parsed as `x_ => (y_ => (x,y))`. Thanks for the great package, if you consider this issue too trivial just close it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.