progs/fun/funt.sc
changeset 956 ae9782e62bdd
parent 901 33cff35bdc1a
child 958 fddf099a82f8
--- a/progs/fun/funt.sc	Fri Nov 17 20:06:43 2023 +0000
+++ b/progs/fun/funt.sc	Tue Nov 28 11:42:31 2023 +0000
@@ -5,13 +5,13 @@
 //
 // call with
 //
-//    amm fun.sc main defs.fun
-//    amm fun.sc main fact.fun
+//    amm funt.sc main defs.fun
+//    amm funt.sc main fact.fun
 //
 //  or
 // 
-//    amm fun.sc run defs.fun
-//    amm fun.sc run fact.fun   
+//    amm funt.sc run defs.fun
+//    amm funt.sc run fact.fun   
 //
 // the first prints out the JVM instructions
 // the second runs the generated class files
@@ -66,13 +66,10 @@
 
 // convenient string interpolations 
 // for instructions, labels and methods
-import scala.language.implicitConversions
-import scala.language.reflectiveCalls
-
-implicit def sring_inters(sc: StringContext) = new {
-    def i(args: Any*): String = "   " ++ sc.s(args:_*) ++ "\n"
-    def l(args: Any*): String = sc.s(args:_*) ++ ":\n"
-    def m(args: Any*): String = sc.s(args:_*) ++ "\n"
+extension (sc: StringContext) {
+  def i(args: Any*): String = "   " ++ sc.s(args:_*) ++ "\n"  // instructions
+  def l(args: Any*): String = sc.s(args:_*) ++ ":\n"          // labels
+  def m(args: Any*): String = sc.s(args:_*) ++ "\n"           // methods
 }