     }
 
     func serialize() -> String {
-        return "\(type.rawValue) \(name) { \(serializeStatements(statements, with: self)) }".removingRepeatedWhitespace()
+        return "\(type.rawValue) \(name) { \(statements.serialize(with: self)) }".removingRepeatedWhitespace()
     }
 }
 

    func serialize(with context: Graph) -> String
}

func serializeStatements(statements: [Statement], with context: Graph) -> String {
    return statements.map({ $0.serialize(with: context) }).joinWithSeparator("; ")
}

struct Graph {


extension Subgraph: Statement {
    func serialize(with context: Graph) -> String {
        return "subgraph \(identifier) { \(statements.serialize(with: context)) }"
    }
}

