Closed
Description
The idea is to have an implicit conversion that converts a T
to an Expr[T]
using the toExpr
conversion. This would allow us to write
def plus(n: Int, m: Expr[Int]): Expr[Int] =
if (n == 0) m else '{ $n + $m }
instead of
def plus(n: Int, m: Expr[Int]): Expr[Int] =
if (n == 0) m else '{ ${n.toExpr} + $m }