Skip to content
Anne Ogborn edited this page Jun 11, 2015 · 2 revisions

Incidentally, I think the forall/2 source code is one of my favourite pieces of Prolog ever. ahh yes the double not force all true to be false then invert that =]

1 ?- listing(forall/2). :- meta_predicate forall(0,0).

forall(A, B) :- + ( call(A), + call(B) ).

true.

oh yea ?search library(predicate_options) predicate_options.pl -- Access and analyse predicate options http://www.swi-prolog.org/pldoc/doc/swi/library/predicate_options.pl that should definitely go under protips ^ so people don't "roll their own" it also goes hand in hand with library(errors) too. i'll mark that one later.

Clone this wiki locally