Package transf :: Package lib :: Module unify
[frames] | no frames]

Module unify



Term unifying transformations.

Functions
 
Foldr(tail, Cons, operand=None)
 
Count(operand)
Count the number of occorrences in a list.
 
Crush(tail, Cons, operand=None)
 
CollectAll(operand, Union=None, reduce=None)
Collect all subterms for which operand succeeds.
 
CountAll(operand)
Count the number of occorrences in all subterms.
Function Details

CollectAll(operand, Union=None, reduce=None)

 

Collect all subterms for which operand succeeds.

collect all subterms with user-defined union operator and a skip argument.
Parameters:
  • Union - transformation factory which takes two lists and produces a single one and produce a single one. If duplicates must be removed, then this argument should be union, otherwise it defaults to concat.
  • reduce - it can be used to reduce the current term before collecting subterms of it. Producing the empty list will result in a complete skip of all subterms.