You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/metaprogramming/macros.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -757,17 +757,17 @@ then the rest of the quote can refer to this definition.
757
757
758
758
To match such a term we need to match the definition and the rest of the code, but we need to expicilty state that the rest of the code may refer to this definition.
759
759
```scala
760
-
case'{ valy:Int= $x; ${body $$ y}:Int } =>
760
+
case'{ valy:Int= $x; ${body}{y}:Int } =>
761
761
```
762
-
Here `$x` will match any closed expression while `${body $$ y}` will match expression that is closed under `y`. Then
762
+
Here `$x` will match any closed expression while `${body}{y}` will match expression that is closed under `y`. Then
763
763
the subxpression of type `Expr[Int]` is bound to `body` as an `Expr[Int => Int]`. The extra argument represents the references to `y`. Usually this expression is used in compination with `Expr.betaReduce` to replace the extra argument.
0 commit comments