build/sorted-list/index.js
function findPrevNode(firstNode, item, comparer) {
    let ret;
    let prevNode = firstNode;
    // while item > prevNode.value
    while (prevNode != undefined && comparer(prevNode.value, item) > 0) {
        ret = prevNode;
        prevNode = prevNode.next;
    }
    return ret;
}
function findPrevNode(firstNode, item, comparer) {
    let ret;
    let prevNode = firstNode;
    // while item > prevNode.value
    while (prevNode != undefined && comparer(prevNode.value, item) > 0) {
        ret = prevNode;
        prevNode = prevNode.next;
    }
    return ret;
}
function findPrevNode ( firstNode , item , comparer ) { let ret ; let prevNode = firstNode ; // while item > prevNode.value while ( prevNode != undefined && comparer ( prevNode . value , item ) > 0 ) { ret = prevNode ; prevNode = prevNode . next ; } return ret ; }
Seeks the list from the beginning and finds the position to add the new item
Seeks the list from the beginning and finds the position to add the new item