anchor.diff:  %%% implementation
   fold(eof,_,Fun,Chunker,State) ->
     ?state(Acc,Tail) = folder(Chunker,Fun,state_eof(State)),
  -  [?log({trailing,Tail}) || not is_empty(Tail)],
  +  [?log([{trailing,Tail}]) || not is_empty(Tail)],
     Acc;
   fold({ok,Chunk},FD,Fun,Chunker,State) -> 
     fold(read(FD),FD,Fun,Chunker,folder(Chunker,Fun,add_chunk(Chunk,State))).
  
positive.code: term_f(Fun) ->
    fun(TermBin,O) ->
        try Fun(to_term(TermBin),O)
        catch {parsing_failed,R} -> ?log({parse_error,R,TermBin}),O
        end
    end.
    
  
negative.code: sax_f(Fun) ->
    fun(RawXML,O) -> 
        try [erlsom:sax(encoding(RawXML),[],sax_if(Fun))|O]
        catch error:R -> ?log([{bt,erlang:get_stacktrace()},{doc,RawXML}]),
                         exit(R)
        end
    end.
  
  