Literate programming in Scala with sbt

February 16, 2019

/***
scalaVersion := "2.11.0"
*/
val x: Int = 6
val y: Int = 7
val z: Int = x * y
println(s"z: ${z}")
$ curl -s https://earldouglas.com/posts/reference/literate/scala-sbt.md |
  codedown scala > script.scala
$ sbt -Dsbt.main.class=sbt.ScriptMain script.scala
z: 42