This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using scala 3.3.0 | |
trait Sel extends Selectable: | |
def selectDynamic(name: String) = s"name: $name" | |
def applyDynamic(name: String)(args: Any*) = s"name: $name, args: $args" | |
object Sel: | |
type Subtype[T <: Sel] = T | |
import scala.quoted.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using scala "3.2.0" | |
//> using lib "org.virtuslab::iskra:0.0.2" | |
import org.virtuslab.iskra.api.* | |
import functions.* | |
import org.virtuslab.iskra.UntypedOps.typed // Improvement: We might make this already available after importing iskra.api.* | |
import org.apache.spark.sql | |
object IskraExtensions: // One can implementing missing wrappers for spark functions themselves and reuse them later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using target.scala "2" | |
object Greating { | |
def greating = "Hello Scala 2" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using scala "3.2.0-RC1" | |
//> using lib "org.scala-lang.modules::scala-xml:2.1.0" | |
trait Renderer[A]: | |
def render(x: A): xml.Elem | |
given Renderer[Int] with | |
def render(x: Int) = <td>{ x.toString }</td> |