addNode :: Node -> Graph -> Graph
addNode node graph
    | any (== node) (nodes graph) = error "node already exists"
    | otherwise                   = Graph (node : (nodes graph)) (edges graph)
addNode :: Node -> Graph -> Graph
addNode node graph
    | any (== node) (nodes graph) = error "node already exists"
    | otherwise                   = Graph (node : (nodes graph)) (edges graph)
addNode node graph
    | any (== node) (nodes graph) = error "node already exists"
    | otherwise                   = Graph (node : (nodes graph)) (edges graph)