anchor.diff:  
   fun_expr_arity(Node) ->
       length(clause_patterns(hd(fun_expr_clauses(Node)))).
  +
  +
  +%% =====================================================================
  +%% @doc Creates an abstract named fun-expression. If `Clauses' is
  +%% `[C1, ..., Cn]', the result represents "<code>fun
  +%% <em>Name</em> <em>C1</em>; ...; <em>Name</em> <em>Cn</em> end</code>".
  +%% More exactly, if each `Ci' represents
  +%% "<code>(<em>Pi1</em>, ..., <em>Pim</em>) <em>Gi</em> -> <em>Bi</em></code>",
  +%% then the result represents
  +%% "<code>fun <em>Name</em>(<em>P11</em>, ..., <em>P1m</em>) <em>G1</em> ->
  +%% <em>B1</em>; ...; <em>Name</em>(<em>Pn1</em>, ..., <em>Pnm</em>)
  +%% <em>Gn</em> -> <em>Bn</em> end</code>".
  +%%
  +%% @see named_fun_expr_name/1
  +%% @see named_fun_expr_clauses/1
  +%% @see named_fun_expr_arity/1
  +
  +-record(named_fun_expr, {name :: syntaxTree(), clauses :: [syntaxTree()]}).
  +
  +%% type(Node) = named_fun_expr
  +%% data(Node) = #named_fun_expr{name :: Name, clauses :: Clauses}
  +%%
  +%%	Name = syntaxTree()
  +%%	Clauses = [syntaxTree()]
  +%%
  +%%	(See `function' for notes; e.g. why the arity is not stored.)
  +%%
  +%% `erl_parse' representation:
  +%%
  +%% {named_fun, Pos, Name, Clauses}
  +%%
  +%%	Clauses = [Clause] \ []
  +%%	Clause = {clause, ...}
  +%%
  +%%	See `clause' for documentation on `erl_parse' clauses.
  +
  +-spec named_fun_expr(syntaxTree(), [syntaxTree()]) -> syntaxTree().
  +
  +named_fun_expr(Name, Clauses) ->
  +    tree(named_fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
  +
  +revert_named_fun_expr(Node) ->
  +    Pos = get_pos(Node),
  +    Name = named_fun_expr_name(Node),
  +    Clauses = [revert_clause(C) || C <- named_fun_expr_clauses(Node)],
  +    case type(Name) of
  +	variable ->
  +	    {named_fun, Pos, variable_name(Name), Clauses};
  +	_ ->
  +	    Node
  +    end.
  +
  +
  +%% =====================================================================
  +%% @doc Returns the name subtree of a `named_fun_expr' node.
  +%%
  +%% @see named_fun_expr/2
  +
  +-spec named_fun_expr_name(syntaxTree()) -> syntaxTree().
  +
  +named_fun_expr_name(Node) ->
  +    case unwrap(Node) of
  +	{named_fun, Pos, Name, _} ->
  +	    set_pos(variable(Name), Pos);
  +	Node1 ->
  +	    (data(Node1))#named_fun_expr.name
  +    end.
  +
  +
  +%% =====================================================================
  +%% @doc Returns the list of clause subtrees of a `named_fun_expr' node.
  +%%
  +%% @see named_fun_expr/2
  +
  +-spec named_fun_expr_clauses(syntaxTree()) -> [syntaxTree()].
  +
  +named_fun_expr_clauses(Node) ->
  +    case unwrap(Node) of
  +	{named_fun, _, _, Clauses} ->
  +	    Clauses;
  +	Node1 ->
  +	    (data(Node1))#named_fun_expr.clauses
  +    end.
  +
  +
  +%% =====================================================================
  +%% @doc Returns the arity of a `named_fun_expr' node. The result is
  +%% the number of parameter patterns in the first clause of the
  +%% named fun-expression; subsequent clauses are ignored.
  +%%
  +%% An exception is thrown if `named_fun_expr_clauses(Node)'
  +%% returns an empty list, or if the first element of that list is not a
  +%% syntax tree `C' of type `clause' such that
  +%% `clause_patterns(C)' is a nonempty list.
  +%%
  +%% @see named_fun_expr/2
  +%% @see named_fun_expr_clauses/1
  +%% @see clause/3
  +%% @see clause_patterns/1
  +
  +-spec named_fun_expr_arity(syntaxTree()) -> arity().
  +named_fun_expr_arity(Node) ->
  +    length(clause_patterns(hd(named_fun_expr_clauses(Node)))).
  +
   
   %% =====================================================================
   %% @spec parentheses(Body::syntaxTree()) -> syntaxTree()
  
positive.code: 		revert_list_comp(Node);
  	     match_expr -> 
  		revert_match_expr(Node);
  	     module_qualifier -> 
  		revert_module_qualifier(Node);
  	     nil -> 
  
negative.code:       {'catch', _, _} -> catch_expr;
        {'cond', _, _} -> cond_expr;
        {'fun', _, {clauses, _}} -> fun_expr;
        {named_fun, _, _, _} -> named_fun_expr;
        {'fun', _, {function, _, _}} -> implicit_fun;
        {'fun', _, {function, _, _, _}} -> implicit_fun; %% Added by HL
        {'if', _, _} -> if_expr;
        {'receive', _, _, _, _} -> receive_expr;
        {'receive', _, _} -> receive_expr;
  