Compose Function for undirected simple graph added

Previously written composite function judiciously modified.