Core concept

inline def sq(inline x: Int): Int = ${ sqImpl('x) }
Advertisement

How it works

Requires understanding Scala 3 compiler API.

Advertisement

Trade-offs + gotchas

Modern macro authors.