I’m going through the list of “mode indicators” again:
And created a little cheatsheet:
… and have a few question, which should be easy to answer (cough):
Currently the text (which I remember to have partially written myself, so any errors extant are mine) says: “partial term (a term which may or may not be ground)”.
Is this true? Are all of
[a,b] considered partial terms?
I never got that I am not supposed to pass an unbound variable at parameter positions marked with a
+ (that’s so, right?)
But I can pass open lists, still?
For example, for
foldl(:Goal, +List, +V0, -V), an unbound variable at
List position is a not supported (although it does work)
?- foldl([E,FL,x]>>true,X,start,Final). X = , Final = start ; X = [_6450], Final = x ; X = [_6450, _11086], Final = x
but an open list is still ok? It is a special kind of nonground term (and so is an open tree or open graph) and the empty open list is just an unbound variable and indistinguishable from any other domain. So maybe
+ also means that open lists are disallowed, too, to keep the domains apart?
?- foldl([E,FL,x]>>true,[a,b|X],start,Final). X = , Final = x ; X = [_8596], Final = x ; X = [_8596, _9992], Final = x ; X = [_8596, _9992, _11388], Final = x
Here is another thought:
foldl(:Goal, +List, +V0, -V)
… should not have any opinion on the mode of
V because the mode of these depends on
Goal. They could be anything (this is where the type expression in Haskell gets complex I imagine?)
Somewhat related, the mode indicators for
I do think this should be