PPT Slide
Some Utilities for Dynamic Knowledge
read( T ) reads a term T from the input stream.
write( T ) writes a term T to the output stream.
listing( A ) writes out all clauses with atom A as their predicate to the output stream.
functor( T, F, N ) succeeds if T is a structure with functor F and arity N. ( If T is a variable, it constructs such a structure.)
arg( Num, T, Argument ) puts Argument into structure T as argument number Num.