I get this compound term:
e(currentNode,"http://localhost:9000/")
How can I get only http://localhost:9000/
separately from that compound?
Or less, is there a way to transform the compound term to a string or a list?
In general you use unification for that:
e(currentNode,"http://localhost:9000/") = e(_,X).
will bind "http://localhost:9000/"
to X
.
You use unification also when you this implicitly by putting variables in place of terms in your query, e.g.:
?- comp(e(_,X)).
will bind to X
the second argument of e
for every matching result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With