prolog: reduce then write the value of a predicate
Posted
by jreid9001
on Stack Overflow
See other posts from Stack Overflow
or by jreid9001
Published on 2010-05-18T13:59:58Z
Indexed on
2010/05/18
14:10 UTC
Read the original article
Hit count: 244
prolog
This is some of the code I am writing
assert(bar(foo)),
assert(foo(bar-5)),
I'm not sure if it works though. I'm trying to get it to reduce foo by 5. I need a way to write the value of foo, but haven't found a way too.
write('foo is' + foo)
would be the logical way to me, but doesn't seem to work.
© Stack Overflow or respective owner