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

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

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

struct Graph {

    }

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

