<commit_before>/* j/2/reel.c
**
*/
#include "all.h"

/* functions
*/
  u3_noun
  u3qb_reel(u3_noun a,
            u3_noun b)
  {
    u3_noun pro = u3k(u3x_at(u3x_sam_3, b));
    if ( u3_nul == a ) {
      return pro;
    }
    else {
      u3j_site sit_u;
      u3_noun  i, t = a;
      c3_w     j_w, len_w = 0, all_w = 89, pre_w = 55;
      u3_noun* vec = u3a_malloc(all_w);

      // stuff list into an array
      do {
        if ( c3n == u3r_cell(t, &i, &t) ) {
          u3a_free(vec);
          return u3m_bail(c3__exit);
        }
        else {
          if ( len_w == all_w ) {
            // grow vec fib-wise
            all_w += pre_w;
            pre_w = len_w;
            vec = u3a_realloc(vec, all_w);
          }
          vec[len_w++] = i;
        }
      } while ( u3_nul != t );

      // now we can iterate backwards
      u3j_gate_prep(&sit_u, u3k(b));
      for ( j_w = len_w; j_w > 0; ) {
        pro = u3j_gate_slam(&sit_u, u3nc(u3k(vec[--j_w]), pro));
      }
      u3j_gate_lose(&sit_u);
      u3a_free(vec);
      return pro;
    }
  }
  u3_noun
  u3wb_reel(u3_noun cor)
  {
    u3_noun a, b;

    if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
      return u3m_bail(c3__exit);
    } else {
      return u3qb_reel(a, b);
    }
  }<commit_msg>fix vector allocation in reel<commit_after>/* j/2/reel.c
**
*/
#include "all.h"

/* functions
*/
  u3_noun
  u3qb_reel(u3_noun a,
            u3_noun b)
  {
    u3_noun pro = u3k(u3x_at(u3x_sam_3, b));
    if ( u3_nul != a ) {
      u3j_site sit_u;
      u3_noun  i, t = a;
      c3_w     j_w, len_w = 0, all_w = 89, pre_w = 55;
      u3_noun* vec = u3a_malloc(all_w * sizeof(u3_noun));

      // stuff list into an array
      do {
        if ( c3n == u3r_cell(t, &i, &t) ) {
          u3a_free(vec);
          return u3m_bail(c3__exit);
        }
        else {
          if ( len_w == all_w ) {
            // grow vec fib-wise
            all_w += pre_w;
            pre_w = len_w;
            vec = u3a_realloc(vec, all_w * sizeof(u3_noun));
          }
          vec[len_w++] = i;
        }
      } while ( u3_nul != t );

      // now we can iterate backwards
      u3j_gate_prep(&sit_u, u3k(b));
      for ( j_w = len_w; j_w > 0; ) {
        pro = u3j_gate_slam(&sit_u, u3nc(u3k(vec[--j_w]), pro));
      }
      u3j_gate_lose(&sit_u);
      u3a_free(vec);
    }
    return pro;
  }
  u3_noun
  u3wb_reel(u3_noun cor)
  {
    u3_noun a, b;

    if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
      return u3m_bail(c3__exit);
    } else {
      return u3qb_reel(a, b);
    }
  }
{'fraction_non_alphanumeric': 0.14109006571318128, 'fraction_numerical': 0.039427908774642445, 'mean_word_length': 1.6300813008130082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2096574', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1199, 'n_words': 223}