I am trying to use get_coeff_value() but the process never end.
get_coeff_value(Val,[],[]).
get_coeff_value(Val, [X|T],Coeff_List):-
get_coeff_value(Val,T,Coeff_List1),
get_val(Val,[X], Coeff),
insert_end(Coeff_List1, Coeff, Coeff_List).
command : get_coeff_value('H', ['H'-5, 'C'-2], Coeff).
I tried get_val() and insert_end() both end perfectly. However this one display :
It gives me the answer I am waiting for but it never stops the process.