Last active
August 29, 2015 14:21
-
-
Save GabrielJones646/11b36945bd5393042c11 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
object ScalaJSExample extends js.JSApp{ | |
def main(): Unit = { | |
val G = """103,2,50,100 | |
|106,1,900,900 | |
|459,40,150,300,67,2 | |
|4,20,30,6000""".stripMargin.lines.toList | |
println(p("Input:")) | |
G.map{x=>println(x)} | |
println(p("Output: 70 bytes")) | |
for{l<-G;r=l.split(",");x=(r++r).slice(4,6).mkString(",")}{println(x)} | |
println(p("Output: 68 bytes credit: ",a(href:= "http://codegolf.stackexchange.com/questions/50381/quickgolf-ignore-the-noise-1/50403?noredirect=1#comment119138_50403", "MrBones"))) | |
G.map(_.split(",")).map(x=>println((x++x).slice(4,6).mkString(","))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment