<commit_before>var Const       = require('const')
  , ClassyClass = require('./class')
  , Moddable    = require('./lib/moddable')
  , eff         = require('./lib/eff')

var Medium = function (medium) {
  medium.use = function (classModules) {
    var newClassModules = [ ].slice.call(medium.mods)

    eff.pushEach(newClassModules, classModules)

    return Moddable(Medium, Const, newClassModules)
  }

  medium.define = function (constructor) {
    return ClassyClass(constructor, medium.mods)
  }
}

module.exports = Const(Moddable(Medium))
<commit_msg>New (wip) medium, using new moddable, far smaller/simpler<commit_after>var Const       = require('const')
  , ClassyClass = require('./class')
  , Moddable    = require('./lib/moddable')
  , Selfish     = require('selfish-js')

var MediumDefinition = function (medium, mediumModules) {
  eff.callEach(medium, mediumModules)

  medium.use = function (newClassModules) {
    return Selfish.simple(Moddable(newClassModules), medium)
  }

  medium.define = function (constructor) {
    return ClassyClass(medium._appliedMods)
  }
}

module.exports = function Medium (modules)  {
  return Selfish.variadic[1]([ MediumDefinition, modules ], Moddable())
}

{'fraction_non_alphanumeric': 0.13421706710853357, 'fraction_numerical': 0.0008285004142502071, 'mean_word_length': 3.9917355371900825, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4961311', 'n_tokens_mistral': 387, 'n_tokens_neox': 382, 'n_words': 76}