             let n = try $0.val("n") as? IotaIdentifier,
             let p = try $0.valSeries("p") as? [IotaIdentifier]
             else { throw IotaBuildError.notAnIdentifier }
-        let f = try IotaFunc(params: p, body: $0.val("b"))
-        functions[n.id] = f
-        return f
+        return try IotaFunc(name: n, params: p, body: $0.val("b"))
+    }
+
+    transformer.rule(pattern: .tree(["statements": .series("p")])) {
+        let p = try $0.valSeries("p")
+        return IotaProgram(statements: p)
     }
 
     return transformer

    case cannotEvaluate(String)
}

protocol IotaExpr {}

extension IotaExpr {
    func evaluate(context: IotaContext) throws -> IotaResult {
        throw IotaRuntimeError.cannotEvaluate("unknown")
    }
}

struct IotaIdentifier: IotaExpr {
    let id: String
}

struct IotaNum: IotaExpr {

                    parser: makeIotaParser(),
                    transformer: makeIotaTransformer()) { ast in
                        do {
                            guard let program = ast as? IotaProgram else { throw IotaRuntimeError.cannotEvaluate("") }
                            let result = try program.run()
                            return "\(result)"
                        } catch {
                            return "error"
