?- foo(hello, X) =.. List. List = [foo, hello, X] ?- Term =.. [baz, foo(1)] Term = baz(foo(1)) ERROR: =../2: Domain error: `compound_non_zero_arity' expected, found `a()'
SWI-Prolog also supports terms with arity 0, as in
section 5. Such terms must be
This predicate raises a domain error as shown below. See also functor/3.
?- a() =.. L.
Tag confusing pages with doc-needs-help|Tags are associated to your profile if you are logged in