Prolog more than one argument or a list as a comparison for a query? -


i'm new prolog , struggling queries. want allow user input number of arguments query. right can work 1 argument

aminofor(x) :-    aminoname(x,_,z),    aminoclass(z,'hydropathy',a),    print('hydropathy'),    print(a). 

with if enter valid input x, it'll output 'hydropathy' , value of a.

however, want make enter multiple inputs x , have give me hydropathy.

e.g. right if enter aminofor(g). tell me hydropathy neutral if enter aminofor(g,h).

error: undefined procedure: aminofor/2 error:     however, there definitions for: error:         aminofor/1 false. 

how solve this, apologies in advance problem explanation appreciated.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -