# \#mlstylejl

**URL:** https://discourse.julialang.org/tag/mlstylejl/869.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Matching for interpolation](https://discourse.julialang.org/t/matching-for-interpolation/103636)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 4\
**Last updated:** [September 8, 2023, 2:49pm UTC](https://discourse.julialang.org/t/matching-for-interpolation/103636 "2023-09-08T14:49:24Z")

</div>

Is there a matching package that can do something like V = \[1.1, 2, 4.8, 6, 9, 11\] x = 5.1 @match begin V\[i\] ≤ x \< V\[i+1\] =\> #some interp function of V\[i\] and V\[i+i\]

---

## [MLStyle's vs MacroTools' @capture](https://discourse.julialang.org/t/mlstyles-vs-macrotools-capture/102968)

<div class="topic-metadata">

**Author:** [@deaminase](https://discourse.julialang.org/u/deaminase)\
**Replies:** 4\
**Last updated:** [September 8, 2023, 12:09am UTC](https://discourse.julialang.org/t/mlstyles-vs-macrotools-capture/102968 "2023-09-08T00:09:07Z")

</div>

Hey folks. I’ve been trying to figure out how to use MLStyle.Modules.AST.@capture for doing the same thing as MacroTools.@capture(ex, fn\_(args\_\_; kws\_\_) | fn\_(args\_\_)) However, I can’t seem to come up with the syntax th…

---

## [MLStyle.jl difficult pattern](https://discourse.julialang.org/t/mlstyle-jl-difficult-pattern/84561)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [July 20, 2022, 11:38pm UTC](https://discourse.julialang.org/t/mlstyle-jl-difficult-pattern/84561 "2022-07-20T23:38:59Z")

</div>

Is it possible to do something like this? using MLStyle @match 1:10 begin \[a, o1..., 5, o2..., b, c\] =\> (a,o1,o2,b,c) end

---

## [Syntax for active patterns](https://discourse.julialang.org/t/syntax-for-active-patterns/71407)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 10:37pm UTC](https://discourse.julialang.org/t/syntax-for-active-patterns/71407 "2021-11-12T22:37:42Z")

</div>

@active Split(xs) begin n = length(xs) n%2==0 ? (xs\[begin:Int(n/2)\], xs\[Int(n/2+1):end\]) : (xs\[begin:Int(floor(n/2))\], xs\[Int(ceil(n/2))\], xs\[Int(floor(n/2+1)):end\]) end @match \[-2,-1,0,1,2\] begi…
