<commit_before>module?.exports = Jnoid = {}

Jnoid.fromDOM = ($, e)->

Jnoid.fromList = (list)->
  new EventStream(sendWrapped(list, toEvent))

Jnoid.unit = (args...)->
  Jnoid.fromList(args)

sendWrapped = (values, wrapper) ->
  (sink) ->
    sink (wrapper value) for value in values
    sink (Jnoid.end())
    nop

# Dummy objects for asserting.
# Should not be equal.
Jnoid.more = "<more>"
Jnoid.noMore = "<no more>"

Jnoid.initial = (value) -> new Initial(value)
Jnoid.next = (value) -> new Next(value)
Jnoid.end = -> new End()

Jnoid.join = (streamOfStreams)-> streamOfStreams.map(toEvent).flatMap(id)

class Event
  isEnd: -> false
  isInitial: -> false
  isNext: -> false

class Next extends Event
  constructor: (@value) -><commit_msg>Cleanup.<commit_after>module?.exports = Jnoid = {}

Jnoid.fromDOM = ($, e)->

Jnoid.fromList = (list)->
  new EventStream(sendWrapped(list, toEvent))

Jnoid.unit = (args...)->
  Jnoid.fromList(args)

sendWrapped = (values, wrapper) ->
  (sink) ->
    sink (wrapper value) for value in values
    sink (Jnoid.end())
    nop

# Dummy objects for asserting.
# Should not be equal.
Jnoid.more = "<more>"
Jnoid.noMore = "<no more>"

Jnoid.initial = (value) -> new Initial(value)
Jnoid.next = (value) -> new Next(value)
Jnoid.end = -> new End()

Jnoid.join = (streamOfStreams)-> streamOfStreams.flatMap(id)

class Event
  isEnd: -> false
  isInitial: -> false
  isNext: -> false

class Next extends Event
  constructor: (@value) ->
{'fraction_non_alphanumeric': 0.164850136239782, 'fraction_numerical': 0.0, 'mean_word_length': 3.634069400630915, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, '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': '2308553', 'n_tokens_mistral': 547, 'n_tokens_neox': 546, 'n_words': 134}