<commit_before>// depth first traversal checking sort order of each node's value against previous

var isBinarySeachTree = function(bst) {
  // reference to previous node value
  var prev;

  // return IIFE of recursive bst traversal
  return (function isBST(bst) {

    // if left, check left and break if necessary
    if ( bst.left && !isBST(bst.left) ) { return false; }

    // break if current node value is less than previous
    if ( bst.value < prev ) { return false; }

    // set previous to current node value
    prev = bst.value;

    // if right, check right and break if necessary
    if (bst.right && !isBST(bst.right) ) { return false; }

    // passes test
    return true;

  })(bst);

};<commit_msg>space<commit_after>// depth first traversal checking sort order of each node's value against previous

var isBinarySeachTree = function(bst) {
  // reference to previous node value
  var prev;

  // return IIFE of recursive bst traversal
  return (function isBST(bst) {

    // if left, check left and break if necessary
    if ( bst.left && !isBST(bst.left) ) { return false; }

    // break if current node value is less than previous
    if ( bst.value < prev ) { return false; }

    // set previous to current node value
    prev = bst.value;

    // if right, check right and break if necessary
    if (bst.right && !isBST(bst.right) ) { return false; }

    // passes test
    return true;

  })(bst);
};
{'fraction_non_alphanumeric': 0.10202655485674354, 'fraction_numerical': 0.0, 'mean_word_length': 2.74869109947644, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6610838', 'n_tokens_mistral': 438, 'n_tokens_neox': 417, 'n_words': 170}