product(0,N,N-1) =.. [product,0,N,N-1] N-1 =.. [-,N,1] product =.. [product] |
name(product,[112,114,111,100,117,99,116]) |
name(product,"product")
.
If X is instantiated to a variable, L must be instantiated to a list of ASCII character codes. E.g.
| ?- name(X,[104,101,108,108,111])). X = hello | ?- name(X,"hello"). X = hello |