I have a function named "message/2" in my module named "message_passing",This function is called in another function hash/1;;;now here is the problem. I need 3 nodes named node1,node2,node3, but when i want to get the current node in a variable named "Current_Node" it dosnt work. It shows an error. It is unable to get the current node in my variable. Please if you the solution kindly mail me on [email protected] I will be very thankful.
** exception error: no true branch found when evaluating an if expression
in function message_passing:hash/1
hash(H)->
Current_Node=node(),
if
Current_Node==node1->
message(node2,H),
message(node3,H);
Current_Node==node2->
message(node1,H),
message(node3,H);
Current_Node==node3->
message(node1,H),
message(node2,H)
end