We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e6746d commit f638f7dCopy full SHA for f638f7d
docs/_docs/reference/metaprogramming/macros.md
@@ -452,10 +452,10 @@ The lambda arguments will replace the variables that might have been extruded.
452
453
```scala
454
'{ ((x: Int) => x + 1).apply(2) } match
455
- case '{ ((y: Int) => $f(y)).apply($z: Int) } =>
+ case '{ ((y: Int) => $f(y): Int).apply($z: Int) } =>
456
// f may contain references to `x` (replaced by `$y`)
457
- // f = (y: Expr[Int]) => '{ $y + 1 }
458
- f(z) // generates '{ 2 + 1 }
+ // f = '{ (y: Int) => $y + 1 }
+ Expr.betaReduce('{ $f($z)}) // generates '{ 2 + 1 }
459
```
460
461
0 commit comments