frequency = text + table ->
  nlog2n = max + n ->
    n = max

    do {2..max} i ->
      if (i * (log2 i) < max) -> n = i, iterate
      else leave
    ;
  ;

  table : [length] = {} ..
  ' length = nlog2n spaces
  ' spaces - words-in text :: spaces ++

  - words-in text ( word -> 
                            if table.!word -> table:word = 1
                            else table:word ++
                  )
_
  text : string
  table : list : string <- integer
;
