         output.append("""
                         }
                     }
+                    if !function.hasReturnStep { return nil }
                     let returnValue = value(function.returnStep, in: stack)
                     if let function = returnValue as? Function {
                         return { self.run(function: function, symbols: symbols, stack: stack + [Runtime(arguments: $0)]) }

    }
    
    private func writeRun(name: String, functionType: Parser.FunctionType, to output: inout String) {
        output.append("private func \(name)Run(_ function: @escaping ([Any]) -> Any) -> \(name) {\n    return { ")
        if functionType.returnType == nil {
            output.append("_ = ")
        }

                }

                @discardableResult
                func run(function: Function, symbols: Symbols, arguments: [Any]) -> Any? {
                    return run(function: function, symbols: symbols, stack: [Runtime(arguments: arguments)])
                }
            }
