bool detach(Node *a, Node *b, Link *l)

This function simplifies the unlinking of two nodes and a link. Its definition is:

bool detach(Node *a, Node *b, Link *l) {
  bool ret=true;
  if (a) ret&=a->unlink_to(l);
  if (b) ret&=b->unlink_from(l);
  return ret;
so it can be used also without checking the validity of the node pointers. Note: the order of the operations is important. Neuron assumes that the link passed to its methods has a valid node at the other end.