:- meta_predicate no_hat_call(0). :- meta_predicate \(0). \(FC) :- copy_term_nat(FC,C),no_hat_call(C). no_hat_call(MGoal) :- write(MGoal),nl, MGoal = (M:Goal), ( var(M) -> call(MGoal) ; Goal = (_^_) -> throw(error(representation_error(lambda_parameters),_)) ; Goal = (_:_), atom(M) -> no_hat_call(Goal) % not needed in SWI ; true ).