;;; Nodejs http
(var http (require "http"))
(var server
(http.createServer
(function (request res)
(res.writeHead 200 {'Content-Type': 'text/plain'})
(res.end "Hello World!"))))
(server.listen 8000 "127.0.0.1")
(console.log "Server running at http://127.0.0.1:8000/")
(cond
(number? x) (console.log "numbers are ok")
(string? x) (console.log "strings are ok")
(boolean? x) (console.log "booleans are ok")
true (console.log "This type is NOT ok"))
(for
(a [1,2,3]
b [3,4,5])
(+ a b))
(var fs (require 'fs'))
(var outfile "text.txt")
(try
(fs.writeFileSync outfile "Hello World")
(function (err)
(console.log (+ "Cannot write file " outfile)
(process.exit 1)))