Did you know ... | Search Documentation: |
Janus iterator apply |
Class janus.apply() is similar to janus.apply_once(), calling a Prolog predicate using functional notation style. It returns a Python iterator that enumerates all answers.
>>> list(janus.apply("user", "between", 1, 6)) [1, 2, 3, 4, 5, 6]
|
None janus.apply.next()apply
as an iterator is to be preferred. See discussion
above. Note that this calling convention cannot distinguish between the
Prolog predicate returning @none
and reaching the end of
the iteration.