tiny scripting language
- A program is just a pure function
import { Env } from 'cyan'
const a = new Env()
a.push('(+ $1 $2)')
a.args([10, 20])
a.run()
import { Env } from 'cyan'
const env = new Env()
const src = `
(let path $req.path)
(puts (cats "Hello"
(? (get 'name'
(parse path '/hello/:name')) 'World')))
`
module.exports = (req, res) => {
return env.pushRun('(put "Hello World")', [req, res])
}