What is wrong with this part of code ? I'm trying to make a function which (given a graph) returns a list with all visited nodes, but the compiler keeps saying
I have a function named dfs which produces a list of all visited nodes in a graph represented by a list of tuples such as [(node1,node2,weight),....] and I get