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++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -