rushcheck 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README +0 -18
  2. data/Rakefile +18 -2
  3. data/Rakefile.in +17 -1
  4. data/data/rushcheck/doc/rushcheck.thtml +4 -3
  5. data/data/rushcheck/examples/roguetile.rb +2 -2
  6. data/data/rushcheck/examples/rspec/stack_spec.rb +22 -22
  7. data/data/rushcheck/rdoc/classes/FalseClass.html +15 -15
  8. data/data/rushcheck/rdoc/classes/FalseClass.src/M000008.html +4 -4
  9. data/data/rushcheck/rdoc/classes/FalseClass.src/M000009.html +18 -0
  10. data/data/rushcheck/rdoc/classes/FalseClass.src/M000010.html +18 -0
  11. data/data/rushcheck/rdoc/classes/Float.html +20 -20
  12. data/data/rushcheck/rdoc/classes/Float.src/M000021.html +21 -0
  13. data/data/rushcheck/rdoc/classes/Float.src/M000022.html +18 -0
  14. data/data/rushcheck/rdoc/classes/Float.src/M000023.html +22 -0
  15. data/data/rushcheck/rdoc/classes/Float.src/M000024.html +20 -0
  16. data/data/rushcheck/rdoc/classes/NegativeInteger.html +160 -0
  17. data/data/rushcheck/rdoc/classes/NegativeInteger.src/M000005.html +26 -0
  18. data/data/rushcheck/rdoc/classes/NegativeInteger.src/M000006.html +21 -0
  19. data/data/rushcheck/rdoc/classes/NilClass.html +15 -15
  20. data/data/rushcheck/rdoc/classes/NilClass.src/M000029.html +18 -0
  21. data/data/rushcheck/rdoc/classes/NilClass.src/M000030.html +18 -0
  22. data/data/rushcheck/rdoc/classes/NilClass.src/M000031.html +18 -0
  23. data/data/rushcheck/rdoc/classes/NonEmptyRandomArray.html +139 -0
  24. data/data/rushcheck/rdoc/classes/NonEmptyRandomArray.src/M000011.html +20 -0
  25. data/data/rushcheck/rdoc/classes/PositiveInteger.html +160 -0
  26. data/data/rushcheck/rdoc/classes/PositiveInteger.src/M000032.html +26 -0
  27. data/data/rushcheck/rdoc/classes/PositiveInteger.src/M000033.html +21 -0
  28. data/data/rushcheck/rdoc/classes/RandomArray.html +75 -15
  29. data/data/rushcheck/rdoc/classes/RandomArray.src/M000012.html +19 -0
  30. data/data/rushcheck/rdoc/classes/RandomArray.src/M000013.html +25 -0
  31. data/data/rushcheck/rdoc/classes/RandomArray.src/M000014.html +27 -0
  32. data/data/rushcheck/rdoc/classes/RandomArray.src/M000015.html +23 -0
  33. data/data/rushcheck/rdoc/classes/RandomArray.src/M000016.html +23 -0
  34. data/data/rushcheck/rdoc/classes/RandomArray.src/M000017.html +22 -0
  35. data/data/rushcheck/rdoc/classes/RandomHash.html +16 -16
  36. data/data/rushcheck/rdoc/classes/RandomHash.src/M000018.html +19 -0
  37. data/data/rushcheck/rdoc/classes/RandomHash.src/M000019.html +26 -0
  38. data/data/rushcheck/rdoc/classes/RandomHash.src/M000020.html +22 -0
  39. data/data/rushcheck/rdoc/classes/RandomProc.html +20 -20
  40. data/data/rushcheck/rdoc/classes/RandomProc.src/M000025.html +18 -0
  41. data/data/rushcheck/rdoc/classes/RandomProc.src/M000026.html +30 -0
  42. data/data/rushcheck/rdoc/classes/RandomProc.src/M000027.html +26 -0
  43. data/data/rushcheck/rdoc/classes/RandomProc.src/M000028.html +20 -0
  44. data/data/rushcheck/rdoc/classes/RushCheck.html +10 -10
  45. data/data/rushcheck/rdoc/classes/RushCheck.src/M000041.html +18 -0
  46. data/data/rushcheck/rdoc/classes/RushCheck.src/M000042.html +27 -0
  47. data/data/rushcheck/rdoc/classes/RushCheck/Arbitrary.html +5 -5
  48. data/data/rushcheck/rdoc/classes/RushCheck/Arbitrary.src/M000043.html +18 -0
  49. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.html +12 -12
  50. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.src/M000081.html +19 -0
  51. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.src/M000082.html +23 -0
  52. data/data/rushcheck/rdoc/classes/RushCheck/Claim.html +9 -9
  53. data/data/rushcheck/rdoc/classes/RushCheck/Claim.src/M000116.html +21 -0
  54. data/data/rushcheck/rdoc/classes/RushCheck/Coarbitrary.html +5 -5
  55. data/data/rushcheck/rdoc/classes/RushCheck/Coarbitrary.src/M000066.html +18 -0
  56. data/data/rushcheck/rdoc/classes/RushCheck/Config.html +35 -35
  57. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000074.html +23 -0
  58. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000075.html +22 -0
  59. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000076.html +22 -0
  60. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000077.html +18 -0
  61. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000078.html +38 -0
  62. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000079.html +55 -0
  63. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000080.html +50 -0
  64. data/data/rushcheck/rdoc/classes/RushCheck/Gen.html +107 -107
  65. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000083.html +4 -4
  66. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000084.html +26 -4
  67. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000085.html +4 -4
  68. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000086.html +6 -10
  69. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000087.html +14 -4
  70. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000088.html +9 -6
  71. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000089.html +4 -4
  72. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000090.html +4 -4
  73. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000091.html +4 -9
  74. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000092.html +4 -5
  75. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000093.html +4 -4
  76. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000094.html +8 -8
  77. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000095.html +18 -0
  78. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000096.html +21 -0
  79. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000097.html +18 -0
  80. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000098.html +18 -0
  81. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000099.html +23 -0
  82. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000100.html +19 -0
  83. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000101.html +18 -0
  84. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000102.html +22 -0
  85. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.html +20 -20
  86. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000049.html +22 -0
  87. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000050.html +32 -0
  88. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000051.html +18 -0
  89. data/data/rushcheck/rdoc/classes/RushCheck/Property.html +10 -10
  90. data/data/rushcheck/rdoc/classes/RushCheck/Property.src/M000114.html +26 -0
  91. data/data/rushcheck/rdoc/classes/RushCheck/Property.src/M000115.html +18 -0
  92. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.html +10 -10
  93. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.src/M000047.html +18 -0
  94. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.src/M000048.html +19 -0
  95. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.html +20 -20
  96. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000044.html +18 -0
  97. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000045.html +18 -0
  98. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000046.html +18 -0
  99. data/data/rushcheck/rdoc/classes/RushCheck/Result.html +19 -19
  100. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000103.html +18 -0
  101. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000104.html +18 -0
  102. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000105.html +18 -0
  103. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.html +27 -27
  104. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000069.html +23 -0
  105. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000070.html +21 -0
  106. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000071.html +21 -0
  107. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000072.html +18 -0
  108. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000073.html +18 -0
  109. data/data/rushcheck/rdoc/classes/RushCheck/TestFailed.html +5 -5
  110. data/data/rushcheck/rdoc/classes/RushCheck/TestFailed.src/M000107.html +18 -0
  111. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.html +10 -10
  112. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.src/M000067.html +18 -0
  113. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.src/M000068.html +18 -0
  114. data/data/rushcheck/rdoc/classes/RushCheck/TestResult.html +5 -5
  115. data/data/rushcheck/rdoc/classes/RushCheck/TestResult.src/M000108.html +18 -0
  116. data/data/rushcheck/rdoc/classes/RushCheck/Testable.html +66 -66
  117. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000052.html +4 -5
  118. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000053.html +4 -7
  119. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000056.html +4 -4
  120. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000057.html +4 -4
  121. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000058.html +18 -0
  122. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000060.html +19 -0
  123. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000061.html +21 -0
  124. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000062.html +18 -0
  125. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000064.html +18 -0
  126. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000065.html +18 -0
  127. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.html +38 -21
  128. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000109.html +18 -0
  129. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000110.html +20 -0
  130. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000111.html +21 -0
  131. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000112.html +18 -0
  132. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000113.html +18 -0
  133. data/data/rushcheck/rdoc/classes/SpecialString.html +5 -5
  134. data/data/rushcheck/rdoc/classes/SpecialString.src/M000007.html +37 -0
  135. data/data/rushcheck/rdoc/classes/String.html +20 -20
  136. data/data/rushcheck/rdoc/classes/String.src/M000034.html +24 -0
  137. data/data/rushcheck/rdoc/classes/String.src/M000035.html +18 -0
  138. data/data/rushcheck/rdoc/classes/String.src/M000036.html +25 -0
  139. data/data/rushcheck/rdoc/classes/String.src/M000037.html +22 -0
  140. data/data/rushcheck/rdoc/classes/TrueClass.html +15 -15
  141. data/data/rushcheck/rdoc/classes/TrueClass.src/M000038.html +18 -0
  142. data/data/rushcheck/rdoc/classes/TrueClass.src/M000039.html +18 -0
  143. data/data/rushcheck/rdoc/classes/TrueClass.src/M000040.html +18 -0
  144. data/data/rushcheck/rdoc/created.rid +1 -1
  145. data/data/rushcheck/rdoc/files/rushcheck/array_rb.html +1 -1
  146. data/data/rushcheck/rdoc/files/rushcheck/assertion_rb.html +1 -1
  147. data/data/rushcheck/rdoc/files/rushcheck/bool_rb.html +1 -1
  148. data/data/rushcheck/rdoc/files/rushcheck/config_rb.html +1 -1
  149. data/data/rushcheck/rdoc/files/rushcheck/gen_rb.html +1 -1
  150. data/data/rushcheck/rdoc/files/rushcheck/integer_rb.html +1 -1
  151. data/data/rushcheck/rdoc/files/rushcheck/random_rb.html +1 -1
  152. data/data/rushcheck/rdoc/files/rushcheck/version_rb.html +1 -1
  153. data/data/rushcheck/rdoc/fr_class_index.html +3 -0
  154. data/data/rushcheck/rdoc/fr_method_index.html +112 -103
  155. data/lib/rushcheck/array.rb +58 -17
  156. data/lib/rushcheck/assertion.rb +1 -1
  157. data/lib/rushcheck/gen.rb +7 -9
  158. data/lib/rushcheck/integer.rb +56 -0
  159. data/lib/rushcheck/property.rb +1 -1
  160. data/lib/rushcheck/random.rb +5 -1
  161. data/lib/rushcheck/version.rb +1 -1
  162. metadata +98 -2
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>rand (RushCheck::Gen)</title>
8
+ <title>choose (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 128</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rand</span>
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>}
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 19</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">choose</span>(<span class="ruby-identifier">lo</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">hi</span>=<span class="ruby-keyword kw">nil</span>)
15
+ <span class="ruby-identifier">rand</span>.<span class="ruby-identifier">fmap</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">lo</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">random</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">lo</span>, <span class="ruby-identifier">hi</span>)[<span class="ruby-value">0</span>] }
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,36 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>sized (RushCheck::Gen)</title>
8
+ <title>create_by_gen (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 136</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sized</span>
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">n</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 27</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create_by_gen</span>(<span class="ruby-identifier">xs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+
18
+ <span class="ruby-identifier">try</span> = <span class="ruby-value">0</span>
19
+ <span class="ruby-keyword kw">begin</span>
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">try</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@@max_create</span>
21
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;Failed to guards too many in the assertion.&quot;</span>)
22
+ <span class="ruby-keyword kw">end</span>
23
+ <span class="ruby-identifier">args</span> = <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span><span class="ruby-operator">|</span>
24
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
25
+ <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
26
+ <span class="ruby-keyword kw">end</span>
27
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
28
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
29
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">ex</span>
30
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">RushCheck</span><span class="ruby-operator">::</span><span class="ruby-constant">GuardException</span>
31
+ <span class="ruby-identifier">try</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
32
+ <span class="ruby-keyword kw">retry</span>
33
+ <span class="ruby-keyword kw">else</span>
34
+ <span class="ruby-identifier">raise</span>(<span class="ruby-identifier">ex</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">to_s</span>)
35
+ <span class="ruby-keyword kw">end</span>
36
+ <span class="ruby-keyword kw">end</span>
37
+ <span class="ruby-keyword kw">end</span>
16
38
  <span class="ruby-keyword kw">end</span></pre>
17
39
  </body>
18
40
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>unit (RushCheck::Gen)</title>
8
+ <title>create (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 143</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">x</span>)
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 57</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create_by_gen</span>(<span class="ruby-identifier">cs</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">arbitrary</span>}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,20 +5,16 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>vector (RushCheck::Gen)</title>
8
+ <title>elements (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 152</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vector</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">len</span>)
15
- <span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
- (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">len</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span>
18
- <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">arbitrary</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 65</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">elements</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;given argument is empty&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">empty?</span>
16
+
17
+ <span class="ruby-identifier">choose</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">fmap</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">xs</span>[<span class="ruby-identifier">i</span>] }
22
18
  <span class="ruby-keyword kw">end</span></pre>
23
19
  </body>
24
20
  </html>
@@ -5,14 +5,24 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>new (RushCheck::Gen)</title>
8
+ <title>frequency (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 165</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
- <span class="ruby-ivar">@proc</span> = <span class="ruby-identifier">f</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 79</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">frequency</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-identifier">tot</span> = <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span>, <span class="ruby-identifier">pair</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]}
16
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">&quot;Illegal frequency:#{xs.inspect}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tot</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
17
+ <span class="ruby-identifier">choose</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">tot</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
18
+ <span class="ruby-identifier">m</span> = <span class="ruby-identifier">n</span>
19
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pair</span><span class="ruby-operator">|</span>
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]
21
+ <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">break</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">1</span>]
22
+ <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-keyword kw">end</span>
16
26
  <span class="ruby-keyword kw">end</span></pre>
17
27
  </body>
18
28
  </html>
@@ -5,16 +5,19 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>bind (RushCheck::Gen)</title>
8
+ <title>lift_array (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 172</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>
17
- <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r2</span>)
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 98</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lift_array</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
18
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
+ <span class="ruby-keyword kw">yield</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
20
+ <span class="ruby-keyword kw">end</span>
18
21
  <span class="ruby-keyword kw">end</span>
19
22
  <span class="ruby-keyword kw">end</span></pre>
20
23
  </body>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>value (RushCheck::Gen)</title>
8
+ <title>oneof (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 183</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
15
- <span class="ruby-ivar">@proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 112</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">oneof</span>(<span class="ruby-identifier">gens</span>)
15
+ <span class="ruby-identifier">elements</span>(<span class="ruby-identifier">gens</span>).<span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>fmap (RushCheck::Gen)</title>
8
+ <title>promote (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 189</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fmap</span>
15
- <span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 122</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">promote</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">a</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) } }
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,19 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>forall (RushCheck::Gen)</title>
8
+ <title>rand (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 197</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">forall</span>
15
- <span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
16
- <span class="ruby-keyword kw">yield</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>).<span class="ruby-identifier">property</span>.<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
17
- <span class="ruby-identifier">res</span>.<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>)
18
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">res</span>)
19
- <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 128</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rand</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>}
21
16
  <span class="ruby-keyword kw">end</span></pre>
22
17
  </body>
23
18
  </html>
@@ -5,15 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>generate (RushCheck::Gen)</title>
8
+ <title>sized (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 209</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">rnd</span>)
15
- <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span> = <span class="ruby-constant">Integer</span>.<span class="ruby-identifier">random</span>(<span class="ruby-identifier">rnd</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">n</span>)
16
- <span class="ruby-identifier">value</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>)
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 136</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sized</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">n</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
17
16
  <span class="ruby-keyword kw">end</span></pre>
18
17
  </body>
19
18
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>resize (RushCheck::Gen)</title>
8
+ <title>unit (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 216</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resize</span>(<span class="ruby-identifier">n</span>)
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 143</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">x</span>)
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,19 +5,19 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>variant (RushCheck::Gen)</title>
8
+ <title>vector (RushCheck::Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 223</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">variant</span>(<span class="ruby-identifier">v</span>)
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">g</span> = (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">v</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">r</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
17
- <span class="ruby-identifier">gen</span>, <span class="ruby-identifier">dummy</span> = <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">split</span>
18
- <span class="ruby-identifier">gen</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 152</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vector</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">len</span>)
15
+ <span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+ (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">len</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span>
18
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
+ <span class="ruby-identifier">c</span>.<span class="ruby-identifier">arbitrary</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
19
20
  <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
21
21
  <span class="ruby-keyword kw">end</span>
22
22
  <span class="ruby-keyword kw">end</span></pre>
23
23
  </body>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 165</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
+ <span class="ruby-ivar">@proc</span> = <span class="ruby-identifier">f</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>bind (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 172</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>
17
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r2</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>value (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 183</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
15
+ <span class="ruby-ivar">@proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>fmap (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 189</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fmap</span>
15
+ <span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)) }
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>forall (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 197</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">forall</span>
15
+ <span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>).<span class="ruby-identifier">property</span>.<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">res</span>.<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>)
18
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">res</span>)
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>generate (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 209</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">rnd</span>)
15
+ <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span> = <span class="ruby-constant">Integer</span>.<span class="ruby-identifier">random</span>(<span class="ruby-identifier">rnd</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">n</span>)
16
+ <span class="ruby-identifier">value</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>)
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>resize (RushCheck::Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 216</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resize</span>(<span class="ruby-identifier">n</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>