<commit_before>type Reject<L> = (error: L) => void
type Resolve<R> = (value: R) => void
type Computation<L, R> = (reject: Reject<L>, resolve: Resolve<R>) => void

class Future<L, R> {
  public static of<R>(value: R): Future<never, R> {
    return new Future((_, resolve) => resolve(value))
  }

  public static reject<L>(reason: L): Future<L, never> {
    return new Future(reject => reject(reason))
  }

  constructor(public fork: Computation<L, R>) {}
<commit_msg>chore(index): export types and class<commit_after>export type Reject<L> = (error: L) => void
export type Resolve<R> = (value: R) => void
export type Computation<L, R> = (reject: Reject<L>, resolve: Resolve<R>) => void

export default class Future<L, R> {
  public static of<R>(value: R): Future<never, R> {
    return new Future((_, resolve) => resolve(value))
  }

  public static reject<L>(reason: L): Future<L, never> {
    return new Future(reject => reject(reason))
  }

  constructor(public fork: Computation<L, R>) {}

{'fraction_non_alphanumeric': 0.1705348133198789, 'fraction_numerical': 0.0, 'mean_word_length': 4.767441860465116, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 35, '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': '5059519', 'n_tokens_mistral': 338, 'n_tokens_neox': 333, 'n_words': 101}