<commit_before>assert = require "assert"
Amen = require "amen"

Amen.describe "Array functions", (context) ->

  {cat, slice, first, second, third, last, rest,
    includes, uniqueBy, unique, uniq, dupes, union, intersection,
    difference, complement, remove, shuffle} = require "../src/array"

  # array-only version of empty, length
  # TODO: import from ... ?
  length = (ax) -> ax.length
  empty = (ax) -> (length ax) == 0

  ax = [1..5]

  context.test "first", -> assert (first ax) == 1
  context.test "second", -> assert (second ax) == 2
  context.test "third", -> assert (third ax) == 3
  context.test "last", -> assert (last ax) == 5
  context.test "rest", -> assert (first rest ax) == 2
  context.test "includes", ->
    assert (includes 3, ax) && !(includes 6, ax)<commit_msg>Added fourth and fifth to the array test.<commit_after>assert = require "assert"
Amen = require "amen"

Amen.describe "Array functions", (context) ->

  {cat, slice, first, second, third, fourth, fifth, last, rest,
    includes, uniqueBy, unique, uniq, dupes, union, intersection,
    difference, complement, remove, shuffle} = require "../src/array"

  # array-only version of empty, length
  # TODO: import from ... ?
  length = (ax) -> ax.length
  empty = (ax) -> (length ax) == 0

  ax = [1..5]

  context.test "first", -> assert (first ax) == 1
  context.test "second", -> assert (second ax) == 2
  context.test "third", -> assert (third ax) == 3
  context.test "fourth", -> assert (fourth ax) == 4
  context.test "fifth", -> assert (fifth ax) == 5
  context.test "last", -> assert (last ax) == 5
  context.test "rest", -> assert (first rest ax) == 2
  context.test "includes", ->
    assert (includes 3, ax) && !(includes 6, ax)
{'fraction_non_alphanumeric': 0.17237376668601276, 'fraction_numerical': 0.012768427161926872, 'mean_word_length': 3.3425692695214106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '3578015', 'n_tokens_mistral': 576, 'n_tokens_neox': 544, 'n_words': 196}