anchor.diff:          destack("c", [{"c", [], []}, {"b", [], []}, {"a", [], []}]),
       ok.
   
  +stack(StartTag, {Name, Attrs, Acc}, Stack) ->
  +    [{Name, Attrs, [StartTag | Acc]} | Stack].
  +
   destack(TagName, Stack) when is_list(Stack) ->
       F = fun (X) ->
                   case X of 
  
positive.code:                 {end_tag, "head"},
                  {start_tag, "body", [], false}],
      {"html", [], [{"head", [], []}, {"body", [], []}]} = parse_tokens(D3),
      ok.
  
  tree([], Stack) ->
      {destack(Stack), []};
  tree([{end_tag, Tag} | Rest], Stack) ->
      tree(Rest, destack(norm(Tag), Stack));
  tree([{start_tag, Tag, Attrs, true} | Rest], [T0 | S0]) ->
      tree(Rest, [destack([norm({Tag, Attrs}), T0]) | S0]);
  tree([{start_tag, Tag, Attrs, false} | Rest], S) ->
      tree(Rest, [norm({Tag, Attrs}) | S]);
  tree([{data, Data, Whitespace} | Rest], [{Tag, Attrs, Acc} | S0]) ->
  
negative.code:         end,
      case lists:splitwith(F, Stack) of
          {_, []} ->
              %% No match, no state change
              Stack;
          {_Pre, [_T]} ->
              %% Unfurl the whole stack, we're done
              destack(Stack);
          {Pre, [T, {T0, A0, Acc0} | Post]} ->
              %% Unfurl up to the tag, then accumulate it
              [{T0, A0, [destack(Pre ++ [T]) | Acc0]} | Post]
      end.
      
  destack([{Tag, Attrs, Acc}]) ->
      {Tag, Attrs, lists:reverse(Acc)};
  destack([{T1, A1, Acc1}, {T0, A0, Acc0} | Rest]) ->
      destack([{T0, A0, [{T1, A1, lists:reverse(Acc1)} | Acc0]} | Rest]).
  
  is_singleton("br") -> true;
  is_singleton("hr") -> true;
  