find method

N? find(
  1. bool test(
    1. N element
    )
)

按条件查找节点

Implementation

N? find(bool Function(N element) test) {
  var currentNode = _first;
  while (currentNode != null) {
    if (test(currentNode)) return currentNode;
    currentNode = currentNode.next;
  }
  return null;
}