Created
November 20, 2013 11:09
-
-
Save jponge/7561474 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
messages = ["Golo will rock you", "Emmanuel Lecharny needs some Scala love"] | |
printer = (what) -> | |
console.log(what) | |
for msg in messages | |
do (msg) -> printer(msg) |
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
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