
13 Jun
2010
13 Jun
'10
1:15 p.m.
Hi, I am trying to write a routine that would generate a graph - where each vertex would be a string. type Graph v = [(v,[v])] -- list of tuples of vertices and adjacent vertices list addEdgeToGraph :: Graph -> String -> String -> Graph I am having trouble coming up with the body of this function - that takes the original graph, and an edge (string -> string) and the produces the new graph. -- Regards, Kashyap