Created
February 8, 2018 02:51
-
-
Save phenan/8ca7b2604bf840459d8582673e75bd6d to your computer and use it in GitHub Desktop.
StringContext の仕様を確かめるコード
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
case class StringContext (ss: String*) { | |
def s (n: Int): String = ss(n) | |
} | |
object StringContextTest { | |
def main (args: Array[String]): Unit = { | |
println(s"foo${1}bar") // print bar (not foo1bar) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment