anchor.diff:  %%% - Assign variables after matching -----------------------------------------------------------%%%
   %%% ---------------------------------------------------------------------------------------------%%%
   % TODO: Review this when cases are next reviewed.
  -assign_matched_vars(Params, [V], [M]) ->
  -        assign_matched_vars(Params, V, M);
  -assign_matched_vars(Params, [V|Vars], [M|Match]) ->
  -    assemble_sequence(
  -        assign_matched_vars(Params, [V], [M]),
  -        assign_matched_vars(Params, Vars, Match)
  -    );
  -assign_matched_vars(Params, {c_var, _, Variable}, {c_var, _, Match}) ->
  -    [estree:expression_statement(
  -        estree:assignment_expression(
  -            <<"=">>,
  -            estree:identifier(atom_to_binary(Match, utf8)),
  -            estree:identifier(atom_to_binary(Variable, utf8))
  -        )
  -    )];
  -assign_matched_vars(Params, {c_var, _, Variable}, {c_alias, _, {c_var, [], Name}, _Value}) ->
  -    [estree:expression_statement(
  -        estree:assignment_expression(
  -            <<"=">>,
  -            estree:identifier(atom_to_binary(Name, utf8)),
  -            estree:identifier(atom_to_binary(Variable, utf8))
  -        )
  -    )];
  -%assign_matched_vars(Params, A, B) ->
  -assign_matched_vars(Params, _, _) ->
  -    [ok].
  +assign_matched_vars(Params, DefineL, AssignL) ->
  +    % Check that variables actually need to be defined before matching is done
  +    case DefineL of
  +        [] -> DefActual = [];
  +        _  -> DefActual = estree:variable_declaration(list_check(DefineL), <<"let">>)
  +    end,
  +    % Check if any assignments are needed after matching
  +    case AssignL of
  +        [] -> AssignActual = [];
  +        _  -> AssignActual = list_check(AssignL)
  +    end,
  +    %Output as a list
  +    assemble_sequence(DefActual,AssignActual).
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +% assign_matched_vars(Params, [V], [M]) ->
  +%         assign_matched_vars(Params, V, M);
  +% assign_matched_vars(Params, [V|Vars], [M|Match]) ->
  +%     assemble_sequence(
  +%         assign_matched_vars(Params, [V], [M]),
  +%         assign_matched_vars(Params, Vars, Match)
  +%     );
  +% assign_matched_vars(Params, {c_var, _, Variable}, {c_var, _, Match}) ->
  +%     [estree:expression_statement(
  +%         estree:assignment_expression(
  +%             <<"=">>,
  +%             estree:identifier(atom_to_binary(Match, utf8)),
  +%             estree:identifier(atom_to_binary(Variable, utf8))
  +%         )
  +%     )];
  +% assign_matched_vars(Params, {c_var, _, Variable}, {c_alias, _, {c_var, [], Name}, _Value}) ->
  +%     [estree:expression_statement(
  +%         estree:assignment_expression(
  +%             <<"=">>,
  +%             estree:identifier(atom_to_binary(Name, utf8)),
  +%             estree:identifier(atom_to_binary(Variable, utf8))
  +%         )
  +%     )];
  +% %assign_matched_vars(Params, A, B) ->
  +% assign_matched_vars(Params, _, _) ->
  +%     [ok].
   
   
   
  
positive.code:                             ),
                              [parse_node(noreturn,Params,M)]
                          )
                      ]),DefL2};
  
                  {V={c_var, _, ParamName}, M={c_cons, _, H, T}}->
                      {lists:append(DefL1,
                          recurse_var_declaration(M)
                      ),
                      lists:append(MatchL,[
  
negative.code:                 ),
                  assemble_sequence(
                      % Assign the variables that are used in the match
                      assign_matched_vars(Params, DefineL, AssignL),
                      encapsulate_expressions(
                          list_check(
                              parse_node(ReturnAtom, Params, Consequent)
  