anchor.diff:            api_refac:type(F@) == arity_qualifier andalso
             api_refac:fun_define_info(F@) == {M, F, A}).
   
  -
  -rule4({M,F,A}, Ith)->
  -    ?RULE(?T("Fun@(N@@, M@, F@, [Args@@])"),
  -          begin
  -              NewArgs@@=delete(Ith, Args@@),
  -              ?QUOTE("Fun@(N@@, M@, F@, [NewArgs@@])")
  -          end,
  -          begin
  -              case api_refac:fun_define_info(Fun@) of
  -                  {erlang, apply, _} -> 
  -                      api_refac:fun_define_info(F@) == {M,F,A};
  -                  _ -> false
  -              end
  -          end).
  -
  -rule5({M,F,A}, Ith)->
  -    ?RULE(?T("F@(Fun@, [Args@@])"),
  -          begin
  -              NewArgs@@=delete(Ith, Args@@),
  -              ?QUOTE("F@(Fun@, [NewArgs@@])")
  -          end,
  -          begin
  -              case api_refac:fun_define_info(F@) of
  -                  {erlang, apply, _} -> 
  -                      api_refac:fun_define_info(Fun@) == {M,F,A};
  -                  _ -> false
  -              end
  -          end).
  -
  -
   %%%===================================================================
   %%% Internal functions
   %%%===================================================================
   
  -delete(Ith, List) ->
  -    lists:sublist(List, Ith-1)++ lists:nthtail(Ith, List).
  +delete(Ith, Args) when is_list(Args) ->
  +    lists:sublist(Args, Ith-1)++ lists:nthtail(Ith, Args);
  +delete(Ith, Arg) ->
  +    Str=lists:flatten(
  +          io_lib:format(
  +            "fun(ArgList) ->
  +                    lists:sublist(ArgList, ~p-1) ++
  +                      lists:nthtail(~p, ArgList)
  +            end(~s)", [Ith, Ith, ?SPLICE(Arg)])),
  +    ?QUOTE(Str).
   
  
positive.code:           api_refac:fun_define_info(f@) == {M, F, A}
           ).
  
  rule2({M,F,A}, Ith) ->
      ?RULE(?T("F@(Args@@)"), 
            begin NewArgs@@=delete(Ith, Args@@),
                  ?QUOTE("F@(NewArgs@@)")
            end,
            api_refac:fun_define_info(F@) == {M, F, A}).
  
  rule3({M,F,A}) ->
      ?RULE(?T("F@"),
  
negative.code: transform_in_cur_file(_Args=#args{current_file_name=File}, MFA, I) ->
      ?FULL_TD_TP([rule1(MFA,I),
                   rule2(MFA,I),
                   rule3(MFA)],
                  [File]).
  
  
  transform_in_client_files(_Args=#args{current_file_name=File,
                                        search_paths=SearchPaths}, 
                            MFA, I) ->
      ?FULL_TD_TP([rule2(MFA,I),
                   rule3(MFA)],
                  api_refac:client_files(File, SearchPaths)).
  
  
  