Skip to content

Instantly share code, notes, and snippets.

@jponge
Created November 20, 2013 11:09
Show Gist options
  • Save jponge/7561474 to your computer and use it in GitHub Desktop.
Save jponge/7561474 to your computer and use it in GitHub Desktop.
messages = ["Golo will rock you", "Emmanuel Lecharny needs some Scala love"]
printer = (what) ->
console.log(what)
for msg in messages
do (msg) -> printer(msg)
package woops.france.qualifed.to.brazil
import java.io.*
fun main(args: Array<String>): Unit {
println("[ Kotlin writes CoffeeScript ]")
val out = FileWriter("golo-app.coffee")
out.write("messages = [\"Golo will rock you\", \"Emmanuel Lecharny needs some Scala love\"]\n")
out.write("printer = (what) ->\n");
out.write(" console.log(what)\n");
out.write("for msg in messages\n");
out.write(" do (msg) -> printer(msg)\n");
out.close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment