prolog. recursive function returning multiple values.
Posted
by obtur
on Stack Overflow
See other posts from Stack Overflow
or by obtur
Published on 2010-05-30T19:14:01Z
Indexed on
2010/05/30
19:32 UTC
Read the original article
Hit count: 145
prolog
I am new in Prolog. I need to declare a function which looks at a list like [[1, 0, 0], [1, 0, 0], [1, 0, 0]] and if the value is 0 returns its address(by considering it as a double array).
I wrote a function basicly in the format: function(..., X) :- function(called by other values).
How can I write a function, that returns a value when each times it called(recursively). May I get them (in above question) as alternative X's???
© Stack Overflow or respective owner