anchor.diff:  -include("rezept.hrl").
   
   -export([process_file/2, process_file/3,
  +         parse_file/2, parse_file/3,
            put_record/2, default_extractor/1]).
   
   -spec process_file(filename:filename(), file:file_info()) -> ok.
  
positive.code:     process_file(Filename, Info, fun ?MODULE:default_extractor/1).
  
  -spec process_file(filename:filename(), file:file_info(), fun()) -> ok.
  process_file(Filename, _Info, InfoExtractor) when is_function(InfoExtractor) ->
      {ok, Lines} = japanese:read_file(Filename),
      %% io:format("~p~n", [Lines]),
      F = fun({newline, NewLine}, Ctx0) ->
  
negative.code:     {Remain, Records0} = ResultCtx,
      Records1 = [ lists:reverse(Remain) | Records0 ],
      io:format("~p records.~n", [length(Records1)]),
      case InfoExtractor of
          undefined -> Records1;
          _  -> lists:map(InfoExtractor, Records1)
      end.
  
  default_extractor(Record) ->
      extract(Record)++[{<<"segments">>, Record}].
  