<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Explanation</title>

    <script type="text/javascript" src="scripts/shCore.js"></script>
    <script type="text/javascript" src="scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="scripts/shBrushSpecs.js"></script>

    <link type="text/css" rel="stylesheet" href="css/shCore.css" />
    <link type="text/css" rel="stylesheet" href="css/shThemeDefault.css" />

    <script type="text/javascript">
      SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
      SyntaxHighlighter.all()
    </script>
  </head>
  <body>
    <h1>Prototype Project</h1>

    <p>This is just a stupid example of what an Escalator document might look like.  This
    documentation is basically a
    <a href="http://daringfireball.net/projects/markdown/" title="Markdown">Markdown</a>
    document, with some extensions (indicated by an initial <code>//</code> on a line)
    that are caught by our preprocessor to handle extracted code fragments and embedded
    tests/examples.

    Here is the code for a factorial function:
<pre class="brush: scala;">
/**
 * A non-OO object to compute factorial.  It's not good FP either...
 */
object Factorial {
  def apply(n: Int): BigInt = if (n &lt;= 1) 1 else Factorial(n - 1) * n
}
</pre>

    <p>Now we can test it:</p>
<pre class="brush: scala">
"Factorial(7) is 5040" in {
  Factorial(7) must_==(5040)
}

"Factorial(n) = Factorial(n-1) * n" in {
  val smallInteger = Gen.choose(1, 100)

  Prop.forAll(smallInteger) { n: Int =&gt;
    Factorial(n) == Factorial(n-1) * n
  } must pass
}                                                                               

"Factorial(-1) is 0" in {
  Factorial(-1) must_==(0)
}
</pre>
<pre class="brush: specs; light: true">
  + Factorial(7) is 5040
  + Factorial(n) = Factorial(n-1) * n
  x Factorial(-1) is 0
</pre>

    <p>And here is an example of its use:</p>
<pre class="brush: scala">
Factorial(100)
</pre>
<pre class="brush: plain; light: true">
res0: BigInt = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
</pre>

    <p>That's about it.</p>
  </body>
</html>
<commit_msg>Fixed target version of html to match version under src<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Explanation</title>

    <script type="text/javascript" src="scripts/shCore.js"></script>
    <script type="text/javascript" src="scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="scripts/shBrushSpecs.js"></script>

    <link type="text/css" rel="stylesheet" href="css/shCore.css" />
    <link type="text/css" rel="stylesheet" href="css/shThemeDefault.css" />

    <script type="text/javascript">
      SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
      SyntaxHighlighter.all()
    </script>
  </head>
  <body>
    <h1>Prototype Project</h1>

    <p>This is just a stupid example of what an Escalator document might look like.  This
    documentation is basically a <a href="http://daringfireball.net/projects/markdown/" title="Markdown">Markdown</a> document, with some extensions (indicated
    by an initial <code>//</code> on a line) that are caught by our preprocessor to handle extracted
    code fragments and embedded tests/examples.</p>

    <p>Here is the code for a factorial function:</p>

<pre class="brush: scala;">
/**
 * A non-OO object to compute factorial.  It's not good FP either...
 */
object Factorial {
  def apply(n: Int): BigInt = if (n &lt;= 1) 1 else Factorial(n - 1) * n
}
</pre>

    <p>Now we can test it:</p>

<pre class="brush: scala">
"Factorial(7) is 5040" in {
  Factorial(7) must_==(5040)
}

"Factorial(n) = Factorial(n-1) * n" in {
  val smallInteger = Gen.choose(1, 100)

  Prop.forAll(smallInteger) { n: Int =&gt;
    Factorial(n) == Factorial(n-1) * n
  } must pass
}

"Factorial(-1) is 0" in {
  Factorial(-1) must_==(0)
}
</pre>

<pre class="brush: specs; light: true">
  + Factorial(7) is 5040
  + Factorial(n) = Factorial(n-1) * n
  x Factorial(-1) is 0
</pre>

    <p>And here is an example of its use:</p>

<pre class="brush: scala">
Factorial(100)
</pre>

<pre class="brush: plain; light: true">
res0: BigInt = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
</pre>

    <p>That's about it.</p>
  </body>
</html>

{'fraction_non_alphanumeric': 0.1596333778881039, 'fraction_numerical': 0.07905289287760169, 'mean_word_length': 3.8321033210332103, 'pattern_counts': {'":': 0, '<': 100, '<?xml version=': 0, '>': 100, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4610766', 'n_tokens_mistral': 2171, 'n_tokens_neox': 1817, 'n_words': 445}