Skip to content

Commit

Permalink
Add note about :on param
Browse files Browse the repository at this point in the history
  • Loading branch information
codesections committed Dec 11, 2021
1 parent 7a8a322 commit eb5abc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Pattern/Match/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,7 @@ for (:add(1, 5), :sub(9, 8), :mult(7, 7)) {
{ die "Unknown op: " ~@_ })
}
```

In all of the examples above, `&choose` has matched against `$_` (the current topic), which is its
default behavior. But if you want it to match on some other value, you can pass that value with the
`:on` named parameter.

0 comments on commit eb5abc3

Please sign in to comment.