echo Trying to detach an existing node in the list:

load_doc D1 list.lht

root N1 D1
list_child N1
list_next N1

equ_node N2 N1
list_child N2

echo --- Before detaching
print_tree N1

list_detach_child N1 N2

echo --- After detaching
print_tree N1

echo Detaching the last node from the list:

equ_node N2 N1
list_child N2

echo --- Before detaching
print_tree N1

list_detach_child N1 N2

echo --- After detaching
print_tree N1


echo Trying to detach from an empty list:

equ_node N2 N1
list_child N2

echo --- Before detaching
print_tree N1

list_detach_child N1 N2

echo --- After detaching
print_tree N1


free_doc D1
