@mojir/lits 2.2.2-alpha.6 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (908) hide show
  1. package/README.md +1556 -107
  2. package/dist/cli/cli/src/cli.d.ts +1 -1
  3. package/dist/cli/cli/src/cliDocumentation/getCliType.d.ts +1 -1
  4. package/dist/cli/cli/src/colorizer.d.ts +36 -36
  5. package/dist/cli/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  6. package/dist/cli/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  7. package/dist/cli/cli/src/js-interop/Cli/index.d.ts +3 -0
  8. package/dist/cli/cli/src/js-interop/utils.d.ts +2 -0
  9. package/dist/cli/cli.js +30531 -12755
  10. package/dist/cli/reference/api.d.ts +53 -41
  11. package/dist/cli/reference/index.d.ts +150 -23
  12. package/dist/cli/src/AutoCompleter/AutoCompleter.d.ts +24 -0
  13. package/dist/cli/src/Lits/Cache.d.ts +1 -1
  14. package/dist/cli/src/Lits/Lits.d.ts +26 -22
  15. package/dist/cli/src/allModules.d.ts +2 -0
  16. package/dist/cli/src/builtin/bindingNode.d.ts +5 -0
  17. package/dist/cli/src/builtin/{normalExpressions/categories → core}/array.d.ts +1 -1
  18. package/dist/cli/src/builtin/{normalExpressions/categories → core}/bitwise.d.ts +1 -1
  19. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/collection.d.ts +1 -1
  20. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/functional.d.ts +1 -1
  21. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/math.d.ts +1 -1
  22. package/dist/cli/src/builtin/core/meta.d.ts +3 -0
  23. package/dist/cli/src/builtin/{normalExpressions/categories → core}/misc.d.ts +1 -1
  24. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/object.d.ts +1 -1
  25. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/predicates.d.ts +1 -1
  26. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/regexp.d.ts +1 -1
  27. package/dist/cli/src/builtin/core/sequence.d.ts +2 -0
  28. package/dist/cli/src/builtin/{normalExpressions/categories → core}/string.d.ts +1 -1
  29. package/dist/cli/src/builtin/core/vector.d.ts +2 -0
  30. package/dist/cli/src/builtin/index.d.ts +10 -34
  31. package/dist/cli/src/builtin/interface.d.ts +92 -24
  32. package/dist/cli/src/builtin/modules/assert/docs.d.ts +2 -0
  33. package/dist/cli/src/builtin/modules/assert/index.d.ts +2 -0
  34. package/dist/cli/src/builtin/modules/bitwise/index.d.ts +2 -0
  35. package/dist/cli/src/builtin/modules/collection/index.d.ts +2 -0
  36. package/dist/cli/src/builtin/modules/functional/index.d.ts +2 -0
  37. package/dist/cli/src/builtin/modules/grid/docs.d.ts +2 -0
  38. package/dist/cli/src/builtin/modules/grid/fromArray.d.ts +8 -0
  39. package/dist/cli/src/builtin/modules/grid/index.d.ts +2 -0
  40. package/dist/cli/src/builtin/modules/grid/transpose.d.ts +2 -0
  41. package/dist/cli/src/builtin/modules/interface.d.ts +11 -0
  42. package/dist/cli/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  43. package/dist/cli/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  44. package/dist/cli/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  45. package/dist/cli/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  46. package/dist/cli/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  47. package/dist/cli/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  48. package/dist/cli/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  49. package/dist/cli/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  50. package/dist/cli/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  51. package/dist/cli/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  52. package/dist/cli/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  53. package/dist/cli/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  54. package/dist/cli/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  55. package/dist/cli/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  56. package/dist/cli/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  57. package/dist/cli/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  58. package/dist/cli/src/builtin/modules/math/index.d.ts +2 -0
  59. package/dist/cli/src/builtin/modules/matrix/docs.d.ts +2 -0
  60. package/dist/cli/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  61. package/dist/cli/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  62. package/dist/cli/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  63. package/dist/cli/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  64. package/dist/cli/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  65. package/dist/cli/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  66. package/dist/cli/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  67. package/dist/cli/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  68. package/dist/cli/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  69. package/dist/cli/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  70. package/dist/cli/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  71. package/dist/cli/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  72. package/dist/cli/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  73. package/dist/cli/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  74. package/dist/cli/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  75. package/dist/cli/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  76. package/dist/cli/src/builtin/modules/matrix/index.d.ts +4 -0
  77. package/dist/cli/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  78. package/dist/cli/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  79. package/dist/cli/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  80. package/dist/cli/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  81. package/dist/cli/src/builtin/modules/number-theory/docs.d.ts +2 -0
  82. package/dist/cli/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  83. package/dist/cli/src/builtin/modules/number-theory/index.d.ts +4 -0
  84. package/dist/cli/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  85. package/dist/cli/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  86. package/dist/cli/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  87. package/dist/cli/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  88. package/dist/cli/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  89. package/dist/cli/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  90. package/dist/cli/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  91. package/dist/cli/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  92. package/dist/cli/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  93. package/dist/cli/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  94. package/dist/cli/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  95. package/dist/cli/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  96. package/dist/cli/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  97. package/dist/cli/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  98. package/dist/cli/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  99. package/dist/cli/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  100. package/dist/cli/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  101. package/dist/cli/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  102. package/dist/cli/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  103. package/dist/cli/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  104. package/dist/cli/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  105. package/dist/cli/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  106. package/dist/cli/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  107. package/dist/cli/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  108. package/dist/cli/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  109. package/dist/cli/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  110. package/dist/cli/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  111. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  112. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  113. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  114. package/dist/cli/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  115. package/dist/cli/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  116. package/dist/cli/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  117. package/dist/cli/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  118. package/dist/cli/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  119. package/dist/cli/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  120. package/dist/cli/src/builtin/modules/random/docs.d.ts +2 -0
  121. package/dist/cli/src/builtin/modules/random/index.d.ts +2 -0
  122. package/dist/cli/src/builtin/modules/sequence/index.d.ts +2 -0
  123. package/dist/cli/src/builtin/modules/string/index.d.ts +2 -0
  124. package/dist/cli/src/builtin/modules/vector/bincount.d.ts +9 -0
  125. package/dist/cli/src/builtin/modules/vector/calcMad.d.ts +1 -0
  126. package/dist/cli/src/builtin/modules/vector/calcMean.d.ts +1 -0
  127. package/dist/cli/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  128. package/dist/cli/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  129. package/dist/cli/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  130. package/dist/cli/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  131. package/dist/cli/src/builtin/modules/vector/docs.d.ts +2 -0
  132. package/dist/cli/src/builtin/modules/vector/entropy.d.ts +8 -0
  133. package/dist/cli/src/builtin/modules/vector/histogram.d.ts +9 -0
  134. package/dist/cli/src/builtin/modules/vector/index.d.ts +2 -0
  135. package/dist/cli/src/builtin/modules/vector/mode.d.ts +6 -0
  136. package/dist/cli/src/builtin/modules/vector/outliers.d.ts +7 -0
  137. package/dist/cli/src/builtin/modules/vector/percentile.d.ts +7 -0
  138. package/dist/cli/src/builtin/modules/vector/quartiles.d.ts +1 -0
  139. package/dist/cli/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  140. package/dist/cli/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  141. package/dist/cli/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  142. package/dist/cli/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  143. package/dist/cli/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  144. package/dist/cli/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  145. package/dist/cli/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  146. package/dist/cli/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  147. package/dist/cli/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  148. package/dist/cli/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  149. package/dist/cli/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  150. package/dist/cli/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  151. package/dist/cli/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  152. package/dist/cli/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  153. package/dist/cli/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  154. package/dist/cli/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  155. package/dist/cli/src/builtin/normalExpressions/index.d.ts +7 -1
  156. package/dist/cli/src/builtin/specialExpressionTypes.d.ts +23 -0
  157. package/dist/cli/src/builtin/specialExpressions/and.d.ts +3 -3
  158. package/dist/cli/src/builtin/specialExpressions/array.d.ts +6 -0
  159. package/dist/cli/src/builtin/specialExpressions/block.d.ts +6 -0
  160. package/dist/cli/src/builtin/specialExpressions/cond.d.ts +3 -3
  161. package/dist/cli/src/builtin/specialExpressions/def.d.ts +5 -4
  162. package/dist/cli/src/builtin/specialExpressions/defined.d.ts +5 -0
  163. package/dist/cli/src/builtin/specialExpressions/functions.d.ts +5 -17
  164. package/dist/cli/src/builtin/specialExpressions/if.d.ts +3 -3
  165. package/dist/cli/src/builtin/specialExpressions/let.d.ts +3 -7
  166. package/dist/cli/src/builtin/specialExpressions/loop.d.ts +3 -4
  167. package/dist/cli/src/builtin/specialExpressions/loops.d.ts +5 -14
  168. package/dist/cli/src/builtin/specialExpressions/object.d.ts +6 -0
  169. package/dist/cli/src/builtin/specialExpressions/or.d.ts +3 -3
  170. package/dist/cli/src/builtin/specialExpressions/qq.d.ts +3 -3
  171. package/dist/cli/src/builtin/specialExpressions/recur.d.ts +3 -3
  172. package/dist/cli/src/builtin/specialExpressions/switch.d.ts +6 -0
  173. package/dist/cli/src/builtin/specialExpressions/throw.d.ts +3 -3
  174. package/dist/cli/src/builtin/specialExpressions/try.d.ts +3 -5
  175. package/dist/cli/src/builtin/specialExpressions/unless.d.ts +6 -0
  176. package/dist/cli/src/builtin/utils.d.ts +3 -15
  177. package/dist/cli/src/cli.d.ts +1 -1
  178. package/dist/cli/src/cliDocumentation/getCliType.d.ts +1 -1
  179. package/dist/cli/src/colorizer.d.ts +36 -36
  180. package/dist/cli/src/constants/constants.d.ts +18 -44
  181. package/dist/cli/src/errors.d.ts +2 -5
  182. package/dist/cli/src/evaluator/ContextStack.d.ts +16 -11
  183. package/dist/cli/src/evaluator/functionExecutors.d.ts +4 -4
  184. package/dist/cli/src/evaluator/index.d.ts +2 -2
  185. package/dist/cli/src/evaluator/interface.d.ts +5 -5
  186. package/dist/cli/src/getUndefinedSymbols/index.d.ts +7 -0
  187. package/dist/cli/src/index.d.ts +9 -12
  188. package/dist/cli/src/initReferenceData.d.ts +1 -0
  189. package/dist/cli/src/interface.d.ts +1 -2
  190. package/dist/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  191. package/dist/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  192. package/dist/cli/src/js-interop/Cli/index.d.ts +3 -0
  193. package/dist/cli/src/js-interop/utils.d.ts +2 -0
  194. package/dist/cli/src/parser/Parser.d.ts +58 -0
  195. package/dist/cli/src/parser/types.d.ts +133 -0
  196. package/dist/cli/src/symbolPatterns.d.ts +2 -0
  197. package/dist/cli/src/tokenizer/minifyTokenStream.d.ts +4 -0
  198. package/dist/cli/src/tokenizer/operators.d.ts +12 -0
  199. package/dist/cli/src/tokenizer/reservedNames.d.ts +66 -0
  200. package/dist/cli/src/tokenizer/token.d.ts +86 -0
  201. package/dist/cli/src/tokenizer/tokenize.d.ts +8 -0
  202. package/dist/cli/src/tokenizer/tokenizers.d.ts +14 -19
  203. package/dist/cli/src/transformer/index.d.ts +2 -2
  204. package/dist/cli/src/typeGuards/annotatedArrays.d.ts +16 -0
  205. package/dist/cli/src/typeGuards/array.d.ts +1 -1
  206. package/dist/cli/src/typeGuards/astNode.d.ts +20 -17
  207. package/dist/cli/src/typeGuards/index.d.ts +1 -10
  208. package/dist/cli/src/typeGuards/lits.d.ts +5 -2
  209. package/dist/cli/src/typeGuards/litsFunction.d.ts +3 -3
  210. package/dist/cli/src/typeGuards/number.d.ts +1 -1
  211. package/dist/cli/src/typeGuards/string.d.ts +1 -1
  212. package/dist/cli/src/untokenizer/index.d.ts +1 -1
  213. package/dist/cli/src/utils/arity.d.ts +10 -0
  214. package/dist/cli/src/utils/debug/debugTools.d.ts +0 -2
  215. package/dist/cli/src/utils/debug/getCodeMarker.d.ts +2 -0
  216. package/dist/cli/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
  217. package/dist/cli/src/utils/docString/generateDocString.d.ts +2 -0
  218. package/dist/cli/src/utils/getAssertionError.d.ts +1 -1
  219. package/dist/cli/src/utils/index.d.ts +9 -6
  220. package/dist/full.esm.js +2 -0
  221. package/dist/full.esm.js.map +1 -0
  222. package/dist/full.js +2 -0
  223. package/dist/full.js.map +1 -0
  224. package/dist/index.esm.js +1 -15635
  225. package/dist/index.esm.js.map +1 -1
  226. package/dist/index.js +1 -15663
  227. package/dist/index.js.map +1 -1
  228. package/dist/lits.iife.js +1 -15668
  229. package/dist/lits.iife.js.map +1 -1
  230. package/dist/modules/assert.esm.js +2 -0
  231. package/dist/modules/assert.esm.js.map +1 -0
  232. package/dist/modules/assert.js +2 -0
  233. package/dist/modules/assert.js.map +1 -0
  234. package/dist/modules/bitwise.esm.js +2 -0
  235. package/dist/modules/bitwise.esm.js.map +1 -0
  236. package/dist/modules/bitwise.js +2 -0
  237. package/dist/modules/bitwise.js.map +1 -0
  238. package/dist/modules/cli/src/cli.d.ts +2 -0
  239. package/dist/modules/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
  240. package/dist/modules/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
  241. package/dist/modules/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
  242. package/dist/modules/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
  243. package/dist/modules/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
  244. package/dist/modules/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
  245. package/dist/modules/cli/src/cliDocumentation/getCliType.d.ts +3 -0
  246. package/dist/modules/cli/src/cliFormatterRules.d.ts +13 -0
  247. package/dist/modules/cli/src/colorizer.d.ts +939 -0
  248. package/dist/modules/cli/src/createReadlineInterface.d.ts +5 -0
  249. package/dist/modules/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  250. package/dist/modules/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  251. package/dist/modules/cli/src/js-interop/Cli/index.d.ts +3 -0
  252. package/dist/modules/cli/src/js-interop/utils.d.ts +2 -0
  253. package/dist/modules/collection.esm.js +2 -0
  254. package/dist/modules/collection.esm.js.map +1 -0
  255. package/dist/modules/collection.js +2 -0
  256. package/dist/modules/collection.js.map +1 -0
  257. package/dist/modules/common/createFormatter.d.ts +6 -0
  258. package/dist/modules/common/utils.d.ts +2 -0
  259. package/dist/modules/functional.esm.js +2 -0
  260. package/dist/modules/functional.esm.js.map +1 -0
  261. package/dist/modules/functional.js +2 -0
  262. package/dist/modules/functional.js.map +1 -0
  263. package/dist/modules/grid.esm.js +2 -0
  264. package/dist/modules/grid.esm.js.map +1 -0
  265. package/dist/modules/grid.js +2 -0
  266. package/dist/modules/grid.js.map +1 -0
  267. package/dist/modules/linear-algebra.esm.js +2 -0
  268. package/dist/modules/linear-algebra.esm.js.map +1 -0
  269. package/dist/modules/linear-algebra.js +2 -0
  270. package/dist/modules/linear-algebra.js.map +1 -0
  271. package/dist/modules/math.esm.js +2 -0
  272. package/dist/modules/math.esm.js.map +1 -0
  273. package/dist/modules/math.js +2 -0
  274. package/dist/modules/math.js.map +1 -0
  275. package/dist/modules/matrix.esm.js +2 -0
  276. package/dist/modules/matrix.esm.js.map +1 -0
  277. package/dist/modules/matrix.js +2 -0
  278. package/dist/modules/matrix.js.map +1 -0
  279. package/dist/modules/number-theory.esm.js +2 -0
  280. package/dist/modules/number-theory.esm.js.map +1 -0
  281. package/dist/modules/number-theory.js +2 -0
  282. package/dist/modules/number-theory.js.map +1 -0
  283. package/dist/modules/random.esm.js +2 -0
  284. package/dist/modules/random.esm.js.map +1 -0
  285. package/dist/modules/random.js +2 -0
  286. package/dist/modules/random.js.map +1 -0
  287. package/dist/modules/reference/api.d.ts +71 -0
  288. package/dist/modules/reference/datatype.d.ts +3 -0
  289. package/dist/modules/reference/index.d.ts +178 -0
  290. package/dist/modules/reference/shorthand.d.ts +3 -0
  291. package/dist/modules/sequence.esm.js +2 -0
  292. package/dist/modules/sequence.esm.js.map +1 -0
  293. package/dist/modules/sequence.js +2 -0
  294. package/dist/modules/sequence.js.map +1 -0
  295. package/dist/modules/src/AutoCompleter/AutoCompleter.d.ts +24 -0
  296. package/dist/modules/src/Lits/Cache.d.ts +16 -0
  297. package/dist/modules/src/Lits/Lits.d.ts +58 -0
  298. package/dist/modules/src/allModules.d.ts +2 -0
  299. package/dist/modules/src/builtin/bindingNode.d.ts +5 -0
  300. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/array.d.ts +1 -1
  301. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/bitwise.d.ts +1 -1
  302. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/collection.d.ts +1 -1
  303. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/functional.d.ts +1 -1
  304. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/math.d.ts +1 -1
  305. package/dist/modules/src/builtin/core/meta.d.ts +3 -0
  306. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/misc.d.ts +1 -1
  307. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/object.d.ts +1 -1
  308. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/predicates.d.ts +1 -1
  309. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/regexp.d.ts +1 -1
  310. package/dist/modules/src/builtin/core/sequence.d.ts +2 -0
  311. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/string.d.ts +1 -1
  312. package/dist/modules/src/builtin/core/vector.d.ts +2 -0
  313. package/dist/modules/src/builtin/index.d.ts +14 -0
  314. package/dist/modules/src/builtin/interface.d.ts +110 -0
  315. package/dist/modules/src/builtin/modules/assert/docs.d.ts +2 -0
  316. package/dist/modules/src/builtin/modules/assert/index.d.ts +2 -0
  317. package/dist/modules/src/builtin/modules/bitwise/index.d.ts +2 -0
  318. package/dist/modules/src/builtin/modules/collection/index.d.ts +2 -0
  319. package/dist/modules/src/builtin/modules/functional/index.d.ts +2 -0
  320. package/dist/modules/src/builtin/modules/grid/docs.d.ts +2 -0
  321. package/dist/modules/src/builtin/modules/grid/fromArray.d.ts +8 -0
  322. package/dist/modules/src/builtin/modules/grid/index.d.ts +2 -0
  323. package/dist/modules/src/builtin/modules/grid/transpose.d.ts +2 -0
  324. package/dist/modules/src/builtin/modules/interface.d.ts +11 -0
  325. package/dist/modules/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  326. package/dist/modules/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  327. package/dist/modules/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  328. package/dist/modules/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  329. package/dist/modules/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  330. package/dist/modules/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  331. package/dist/modules/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  332. package/dist/modules/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  333. package/dist/modules/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  334. package/dist/modules/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  335. package/dist/modules/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  336. package/dist/modules/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  337. package/dist/modules/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  338. package/dist/modules/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  339. package/dist/modules/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  340. package/dist/modules/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  341. package/dist/modules/src/builtin/modules/math/index.d.ts +2 -0
  342. package/dist/modules/src/builtin/modules/matrix/docs.d.ts +2 -0
  343. package/dist/modules/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  344. package/dist/modules/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  345. package/dist/modules/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  346. package/dist/modules/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  347. package/dist/modules/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
  348. package/dist/modules/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  349. package/dist/modules/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  350. package/dist/modules/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  351. package/dist/modules/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  352. package/dist/modules/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  353. package/dist/modules/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  354. package/dist/modules/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  355. package/dist/modules/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  356. package/dist/modules/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  357. package/dist/modules/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  358. package/dist/modules/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  359. package/dist/modules/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  360. package/dist/modules/src/builtin/modules/matrix/index.d.ts +4 -0
  361. package/dist/modules/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  362. package/dist/modules/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  363. package/dist/modules/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  364. package/dist/modules/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  365. package/dist/modules/src/builtin/modules/number-theory/docs.d.ts +2 -0
  366. package/dist/modules/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  367. package/dist/modules/src/builtin/modules/number-theory/index.d.ts +4 -0
  368. package/dist/modules/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  369. package/dist/modules/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  370. package/dist/modules/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  371. package/dist/modules/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  372. package/dist/modules/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  373. package/dist/modules/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  374. package/dist/modules/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  375. package/dist/modules/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  376. package/dist/modules/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  377. package/dist/modules/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  378. package/dist/modules/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  379. package/dist/modules/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  380. package/dist/modules/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  381. package/dist/modules/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  382. package/dist/modules/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  383. package/dist/modules/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  384. package/dist/modules/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  385. package/dist/modules/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  386. package/dist/modules/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  387. package/dist/modules/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  388. package/dist/modules/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  389. package/dist/modules/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  390. package/dist/modules/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  391. package/dist/modules/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  392. package/dist/modules/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  393. package/dist/modules/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  394. package/dist/modules/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  395. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  396. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  397. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  398. package/dist/modules/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  399. package/dist/modules/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  400. package/dist/modules/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  401. package/dist/modules/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  402. package/dist/modules/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  403. package/dist/modules/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  404. package/dist/modules/src/builtin/modules/random/docs.d.ts +2 -0
  405. package/dist/modules/src/builtin/modules/random/index.d.ts +2 -0
  406. package/dist/modules/src/builtin/modules/sequence/index.d.ts +2 -0
  407. package/dist/modules/src/builtin/modules/string/index.d.ts +2 -0
  408. package/dist/modules/src/builtin/modules/vector/bincount.d.ts +9 -0
  409. package/dist/modules/src/builtin/modules/vector/calcMad.d.ts +1 -0
  410. package/dist/modules/src/builtin/modules/vector/calcMean.d.ts +1 -0
  411. package/dist/modules/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  412. package/dist/modules/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  413. package/dist/modules/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  414. package/dist/modules/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  415. package/dist/modules/src/builtin/modules/vector/docs.d.ts +2 -0
  416. package/dist/modules/src/builtin/modules/vector/entropy.d.ts +8 -0
  417. package/dist/modules/src/builtin/modules/vector/histogram.d.ts +9 -0
  418. package/dist/modules/src/builtin/modules/vector/index.d.ts +2 -0
  419. package/dist/modules/src/builtin/modules/vector/mode.d.ts +6 -0
  420. package/dist/modules/src/builtin/modules/vector/outliers.d.ts +7 -0
  421. package/dist/modules/src/builtin/modules/vector/percentile.d.ts +7 -0
  422. package/dist/modules/src/builtin/modules/vector/quartiles.d.ts +1 -0
  423. package/dist/modules/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  424. package/dist/modules/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  425. package/dist/modules/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  426. package/dist/modules/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  427. package/dist/modules/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  428. package/dist/modules/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  429. package/dist/modules/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  430. package/dist/modules/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  431. package/dist/modules/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  432. package/dist/modules/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  433. package/dist/modules/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  434. package/dist/modules/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  435. package/dist/modules/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  436. package/dist/modules/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  437. package/dist/modules/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  438. package/dist/modules/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  439. package/dist/modules/src/builtin/normalExpressions/index.d.ts +8 -0
  440. package/dist/modules/src/builtin/specialExpressionTypes.d.ts +23 -0
  441. package/dist/modules/src/builtin/specialExpressions/and.d.ts +6 -0
  442. package/dist/modules/src/builtin/specialExpressions/array.d.ts +6 -0
  443. package/dist/modules/src/builtin/specialExpressions/block.d.ts +6 -0
  444. package/dist/modules/src/builtin/specialExpressions/cond.d.ts +6 -0
  445. package/dist/modules/src/builtin/specialExpressions/def.d.ts +6 -0
  446. package/dist/modules/src/builtin/specialExpressions/defined.d.ts +5 -0
  447. package/dist/modules/src/builtin/specialExpressions/functions.d.ts +6 -0
  448. package/dist/modules/src/builtin/specialExpressions/if.d.ts +6 -0
  449. package/dist/modules/src/builtin/specialExpressions/let.d.ts +6 -0
  450. package/dist/modules/src/builtin/specialExpressions/loop.d.ts +6 -0
  451. package/dist/modules/src/builtin/specialExpressions/loops.d.ts +9 -0
  452. package/dist/modules/src/builtin/specialExpressions/object.d.ts +6 -0
  453. package/dist/modules/src/builtin/specialExpressions/or.d.ts +6 -0
  454. package/dist/modules/src/builtin/specialExpressions/qq.d.ts +6 -0
  455. package/dist/modules/src/builtin/specialExpressions/recur.d.ts +5 -0
  456. package/dist/modules/src/builtin/specialExpressions/switch.d.ts +6 -0
  457. package/dist/modules/src/builtin/specialExpressions/throw.d.ts +5 -0
  458. package/dist/modules/src/builtin/specialExpressions/try.d.ts +6 -0
  459. package/dist/modules/src/builtin/specialExpressions/unless.d.ts +6 -0
  460. package/dist/modules/src/builtin/utils.d.ts +6 -0
  461. package/dist/modules/src/constants/constants.d.ts +19 -0
  462. package/dist/modules/src/errors.d.ts +24 -0
  463. package/dist/modules/src/evaluator/ContextStack.d.ts +29 -0
  464. package/dist/modules/src/evaluator/functionExecutors.d.ts +11 -0
  465. package/dist/modules/src/evaluator/index.d.ts +5 -0
  466. package/dist/modules/src/evaluator/interface.d.ts +12 -0
  467. package/dist/modules/src/full.d.ts +17 -0
  468. package/dist/modules/src/getUndefinedSymbols/index.d.ts +7 -0
  469. package/dist/modules/src/index.d.ts +14 -0
  470. package/dist/modules/src/initReferenceData.d.ts +1 -0
  471. package/dist/modules/src/interface.d.ts +7 -0
  472. package/dist/modules/src/modules/assert.d.ts +2 -0
  473. package/dist/modules/src/modules/bitwise.d.ts +2 -0
  474. package/dist/modules/src/modules/collection.d.ts +2 -0
  475. package/dist/modules/src/modules/functional.d.ts +2 -0
  476. package/dist/modules/src/modules/grid.d.ts +2 -0
  477. package/dist/modules/src/modules/linear-algebra.d.ts +2 -0
  478. package/dist/modules/src/modules/math.d.ts +2 -0
  479. package/dist/modules/src/modules/matrix.d.ts +2 -0
  480. package/dist/modules/src/modules/number-theory.d.ts +2 -0
  481. package/dist/modules/src/modules/random.d.ts +2 -0
  482. package/dist/modules/src/modules/sequence.d.ts +2 -0
  483. package/dist/modules/src/modules/string.d.ts +2 -0
  484. package/dist/modules/src/modules/vector.d.ts +2 -0
  485. package/dist/modules/src/parser/Parser.d.ts +58 -0
  486. package/dist/modules/src/parser/types.d.ts +133 -0
  487. package/dist/modules/src/symbolPatterns.d.ts +2 -0
  488. package/dist/modules/src/testFramework/index.d.ts +14 -0
  489. package/dist/modules/src/tokenizer/minifyTokenStream.d.ts +4 -0
  490. package/dist/modules/src/tokenizer/operators.d.ts +12 -0
  491. package/dist/modules/src/tokenizer/reservedNames.d.ts +66 -0
  492. package/dist/modules/src/tokenizer/token.d.ts +86 -0
  493. package/dist/modules/src/tokenizer/tokenize.d.ts +8 -0
  494. package/dist/modules/src/tokenizer/tokenizers.d.ts +14 -0
  495. package/dist/modules/src/transformer/index.d.ts +2 -0
  496. package/dist/modules/src/typeGuards/annotatedArrays.d.ts +16 -0
  497. package/dist/modules/src/typeGuards/array.d.ts +9 -0
  498. package/dist/modules/src/typeGuards/astNode.d.ts +20 -0
  499. package/dist/modules/src/typeGuards/index.d.ts +8 -0
  500. package/dist/modules/src/typeGuards/lits.d.ts +24 -0
  501. package/dist/modules/src/typeGuards/litsFunction.d.ts +12 -0
  502. package/dist/modules/src/typeGuards/number.d.ts +66 -0
  503. package/dist/modules/src/typeGuards/string.d.ts +15 -0
  504. package/dist/modules/src/untokenizer/index.d.ts +2 -0
  505. package/dist/modules/src/utils/arity.d.ts +10 -0
  506. package/dist/modules/src/utils/debug/debugTools.d.ts +1 -0
  507. package/dist/modules/src/utils/debug/getCodeMarker.d.ts +2 -0
  508. package/dist/modules/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
  509. package/dist/modules/src/utils/docString/generateDocString.d.ts +2 -0
  510. package/dist/modules/src/utils/getAssertionError.d.ts +3 -0
  511. package/dist/modules/src/utils/index.d.ts +14 -0
  512. package/dist/modules/src/utils/symbols.d.ts +2 -0
  513. package/dist/modules/string.esm.js +2 -0
  514. package/dist/modules/string.esm.js.map +1 -0
  515. package/dist/modules/string.js +2 -0
  516. package/dist/modules/string.js.map +1 -0
  517. package/dist/modules/vector.esm.js +2 -0
  518. package/dist/modules/vector.esm.js.map +1 -0
  519. package/dist/modules/vector.js +2 -0
  520. package/dist/modules/vector.js.map +1 -0
  521. package/dist/reference/api.d.ts +53 -41
  522. package/dist/reference/index.d.ts +150 -23
  523. package/dist/src/AutoCompleter/AutoCompleter.d.ts +24 -0
  524. package/dist/src/Lits/Cache.d.ts +1 -1
  525. package/dist/src/Lits/Lits.d.ts +26 -22
  526. package/dist/src/allModules.d.ts +2 -0
  527. package/dist/src/builtin/bindingNode.d.ts +5 -0
  528. package/dist/src/builtin/core/array.d.ts +2 -0
  529. package/dist/src/builtin/core/bitwise.d.ts +2 -0
  530. package/dist/src/builtin/core/collection.d.ts +2 -0
  531. package/dist/src/builtin/core/functional.d.ts +2 -0
  532. package/dist/src/builtin/core/math.d.ts +2 -0
  533. package/dist/src/builtin/core/meta.d.ts +3 -0
  534. package/dist/src/builtin/core/misc.d.ts +2 -0
  535. package/dist/src/builtin/core/object.d.ts +2 -0
  536. package/dist/src/builtin/core/predicates.d.ts +2 -0
  537. package/dist/src/builtin/core/regexp.d.ts +2 -0
  538. package/dist/src/builtin/core/sequence.d.ts +2 -0
  539. package/dist/src/builtin/core/string.d.ts +2 -0
  540. package/dist/src/builtin/core/vector.d.ts +2 -0
  541. package/dist/src/builtin/index.d.ts +10 -34
  542. package/dist/src/builtin/interface.d.ts +92 -24
  543. package/dist/src/builtin/modules/assert/docs.d.ts +2 -0
  544. package/dist/src/builtin/modules/assert/index.d.ts +2 -0
  545. package/dist/src/builtin/modules/bitwise/index.d.ts +2 -0
  546. package/dist/src/builtin/modules/collection/index.d.ts +2 -0
  547. package/dist/src/builtin/modules/functional/index.d.ts +2 -0
  548. package/dist/src/builtin/modules/grid/docs.d.ts +2 -0
  549. package/dist/src/builtin/modules/grid/fromArray.d.ts +8 -0
  550. package/dist/src/builtin/modules/grid/index.d.ts +2 -0
  551. package/dist/src/builtin/modules/grid/transpose.d.ts +2 -0
  552. package/dist/src/builtin/modules/interface.d.ts +11 -0
  553. package/dist/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  554. package/dist/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  555. package/dist/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  556. package/dist/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  557. package/dist/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  558. package/dist/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  559. package/dist/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  560. package/dist/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  561. package/dist/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  562. package/dist/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  563. package/dist/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  564. package/dist/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  565. package/dist/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  566. package/dist/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  567. package/dist/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  568. package/dist/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  569. package/dist/src/builtin/modules/math/index.d.ts +2 -0
  570. package/dist/src/builtin/modules/matrix/docs.d.ts +2 -0
  571. package/dist/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  572. package/dist/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  573. package/dist/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  574. package/dist/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  575. package/dist/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
  576. package/dist/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  577. package/dist/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  578. package/dist/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  579. package/dist/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  580. package/dist/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  581. package/dist/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  582. package/dist/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  583. package/dist/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  584. package/dist/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  585. package/dist/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  586. package/dist/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  587. package/dist/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  588. package/dist/src/builtin/modules/matrix/index.d.ts +4 -0
  589. package/dist/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  590. package/dist/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  591. package/dist/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  592. package/dist/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  593. package/dist/src/builtin/modules/number-theory/docs.d.ts +2 -0
  594. package/dist/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  595. package/dist/src/builtin/modules/number-theory/index.d.ts +4 -0
  596. package/dist/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  597. package/dist/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  598. package/dist/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  599. package/dist/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  600. package/dist/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  601. package/dist/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  602. package/dist/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  603. package/dist/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  604. package/dist/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  605. package/dist/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  606. package/dist/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  607. package/dist/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  608. package/dist/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  609. package/dist/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  610. package/dist/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  611. package/dist/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  612. package/dist/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  613. package/dist/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  614. package/dist/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  615. package/dist/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  616. package/dist/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  617. package/dist/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  618. package/dist/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  619. package/dist/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  620. package/dist/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  621. package/dist/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  622. package/dist/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  623. package/dist/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  624. package/dist/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  625. package/dist/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  626. package/dist/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  627. package/dist/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  628. package/dist/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  629. package/dist/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  630. package/dist/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  631. package/dist/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  632. package/dist/src/builtin/modules/random/docs.d.ts +2 -0
  633. package/dist/src/builtin/modules/random/index.d.ts +2 -0
  634. package/dist/src/builtin/modules/sequence/index.d.ts +2 -0
  635. package/dist/src/builtin/modules/string/index.d.ts +2 -0
  636. package/dist/src/builtin/modules/vector/bincount.d.ts +9 -0
  637. package/dist/src/builtin/modules/vector/calcMad.d.ts +1 -0
  638. package/dist/src/builtin/modules/vector/calcMean.d.ts +1 -0
  639. package/dist/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  640. package/dist/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  641. package/dist/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  642. package/dist/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  643. package/dist/src/builtin/modules/vector/docs.d.ts +2 -0
  644. package/dist/src/builtin/modules/vector/entropy.d.ts +8 -0
  645. package/dist/src/builtin/modules/vector/histogram.d.ts +9 -0
  646. package/dist/src/builtin/modules/vector/index.d.ts +2 -0
  647. package/dist/src/builtin/modules/vector/mode.d.ts +6 -0
  648. package/dist/src/builtin/modules/vector/outliers.d.ts +7 -0
  649. package/dist/src/builtin/modules/vector/percentile.d.ts +7 -0
  650. package/dist/src/builtin/modules/vector/quartiles.d.ts +1 -0
  651. package/dist/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  652. package/dist/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  653. package/dist/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  654. package/dist/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  655. package/dist/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  656. package/dist/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  657. package/dist/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  658. package/dist/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  659. package/dist/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  660. package/dist/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  661. package/dist/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  662. package/dist/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  663. package/dist/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  664. package/dist/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  665. package/dist/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  666. package/dist/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  667. package/dist/src/builtin/normalExpressions/index.d.ts +7 -1
  668. package/dist/src/builtin/specialExpressionTypes.d.ts +23 -0
  669. package/dist/src/builtin/specialExpressions/and.d.ts +3 -3
  670. package/dist/src/builtin/specialExpressions/array.d.ts +6 -0
  671. package/dist/src/builtin/specialExpressions/block.d.ts +6 -0
  672. package/dist/src/builtin/specialExpressions/cond.d.ts +3 -3
  673. package/dist/src/builtin/specialExpressions/def.d.ts +5 -4
  674. package/dist/src/builtin/specialExpressions/defined.d.ts +5 -0
  675. package/dist/src/builtin/specialExpressions/functions.d.ts +5 -17
  676. package/dist/src/builtin/specialExpressions/if.d.ts +3 -3
  677. package/dist/src/builtin/specialExpressions/let.d.ts +3 -7
  678. package/dist/src/builtin/specialExpressions/loop.d.ts +3 -4
  679. package/dist/src/builtin/specialExpressions/loops.d.ts +5 -14
  680. package/dist/src/builtin/specialExpressions/object.d.ts +6 -0
  681. package/dist/src/builtin/specialExpressions/or.d.ts +3 -3
  682. package/dist/src/builtin/specialExpressions/qq.d.ts +3 -3
  683. package/dist/src/builtin/specialExpressions/recur.d.ts +3 -3
  684. package/dist/src/builtin/specialExpressions/switch.d.ts +6 -0
  685. package/dist/src/builtin/specialExpressions/throw.d.ts +3 -3
  686. package/dist/src/builtin/specialExpressions/try.d.ts +3 -5
  687. package/dist/src/builtin/specialExpressions/unless.d.ts +6 -0
  688. package/dist/src/builtin/utils.d.ts +3 -15
  689. package/dist/src/constants/constants.d.ts +18 -44
  690. package/dist/src/errors.d.ts +2 -5
  691. package/dist/src/evaluator/ContextStack.d.ts +16 -11
  692. package/dist/src/evaluator/functionExecutors.d.ts +4 -4
  693. package/dist/src/evaluator/index.d.ts +2 -2
  694. package/dist/src/evaluator/interface.d.ts +5 -5
  695. package/dist/src/full.d.ts +17 -0
  696. package/dist/src/getUndefinedSymbols/index.d.ts +7 -0
  697. package/dist/src/index.d.ts +9 -12
  698. package/dist/src/initReferenceData.d.ts +1 -0
  699. package/dist/src/interface.d.ts +1 -2
  700. package/dist/src/modules/assert.d.ts +2 -0
  701. package/dist/src/modules/bitwise.d.ts +2 -0
  702. package/dist/src/modules/collection.d.ts +2 -0
  703. package/dist/src/modules/functional.d.ts +2 -0
  704. package/dist/src/modules/grid.d.ts +2 -0
  705. package/dist/src/modules/linear-algebra.d.ts +2 -0
  706. package/dist/src/modules/math.d.ts +2 -0
  707. package/dist/src/modules/matrix.d.ts +2 -0
  708. package/dist/src/modules/number-theory.d.ts +2 -0
  709. package/dist/src/modules/random.d.ts +2 -0
  710. package/dist/src/modules/sequence.d.ts +2 -0
  711. package/dist/src/modules/string.d.ts +2 -0
  712. package/dist/src/modules/vector.d.ts +2 -0
  713. package/dist/src/parser/Parser.d.ts +58 -0
  714. package/dist/src/parser/types.d.ts +133 -0
  715. package/dist/src/symbolPatterns.d.ts +2 -0
  716. package/dist/src/tokenizer/minifyTokenStream.d.ts +4 -0
  717. package/dist/src/tokenizer/operators.d.ts +12 -0
  718. package/dist/src/tokenizer/reservedNames.d.ts +66 -0
  719. package/dist/src/tokenizer/token.d.ts +86 -0
  720. package/dist/src/tokenizer/tokenize.d.ts +8 -0
  721. package/dist/src/tokenizer/tokenizers.d.ts +14 -19
  722. package/dist/src/transformer/index.d.ts +2 -2
  723. package/dist/src/typeGuards/annotatedArrays.d.ts +16 -0
  724. package/dist/src/typeGuards/array.d.ts +1 -1
  725. package/dist/src/typeGuards/astNode.d.ts +20 -17
  726. package/dist/src/typeGuards/index.d.ts +1 -10
  727. package/dist/src/typeGuards/lits.d.ts +5 -2
  728. package/dist/src/typeGuards/litsFunction.d.ts +3 -3
  729. package/dist/src/typeGuards/number.d.ts +1 -1
  730. package/dist/src/typeGuards/string.d.ts +1 -1
  731. package/dist/src/untokenizer/index.d.ts +1 -1
  732. package/dist/src/utils/arity.d.ts +10 -0
  733. package/dist/src/utils/debug/debugTools.d.ts +0 -2
  734. package/dist/src/utils/debug/getCodeMarker.d.ts +2 -0
  735. package/dist/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
  736. package/dist/src/utils/docString/generateDocString.d.ts +2 -0
  737. package/dist/src/utils/getAssertionError.d.ts +1 -1
  738. package/dist/src/utils/index.d.ts +9 -6
  739. package/dist/testFramework.esm.js +1 -8913
  740. package/dist/testFramework.esm.js.map +1 -1
  741. package/dist/testFramework.js +1 -8916
  742. package/dist/testFramework.js.map +1 -1
  743. package/package.json +88 -8
  744. package/dist/cli/common/clojureDocs.d.ts +0 -1
  745. package/dist/cli/reference/categories/array.d.ts +0 -3
  746. package/dist/cli/reference/categories/assert.d.ts +0 -3
  747. package/dist/cli/reference/categories/bitwise.d.ts +0 -3
  748. package/dist/cli/reference/categories/collection.d.ts +0 -3
  749. package/dist/cli/reference/categories/functional.d.ts +0 -3
  750. package/dist/cli/reference/categories/math.d.ts +0 -3
  751. package/dist/cli/reference/categories/misc.d.ts +0 -3
  752. package/dist/cli/reference/categories/object.d.ts +0 -3
  753. package/dist/cli/reference/categories/predicate.d.ts +0 -3
  754. package/dist/cli/reference/categories/regularExpression.d.ts +0 -3
  755. package/dist/cli/reference/categories/sequence.d.ts +0 -3
  756. package/dist/cli/reference/categories/specialExpressions.d.ts +0 -3
  757. package/dist/cli/reference/categories/string.d.ts +0 -3
  758. package/dist/cli/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  759. package/dist/cli/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  760. package/dist/cli/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  761. package/dist/cli/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  762. package/dist/cli/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  763. package/dist/cli/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  764. package/dist/cli/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  765. package/dist/cli/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  766. package/dist/cli/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  767. package/dist/cli/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  768. package/dist/cli/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  769. package/dist/cli/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  770. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  771. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  772. package/dist/cli/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  773. package/dist/cli/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  774. package/dist/cli/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  775. package/dist/cli/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  776. package/dist/cli/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
  777. package/dist/cli/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  778. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  779. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  780. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  781. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  782. package/dist/cli/src/analyze/calculateOutcomes/index.d.ts +0 -18
  783. package/dist/cli/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  784. package/dist/cli/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
  785. package/dist/cli/src/analyze/index.d.ts +0 -17
  786. package/dist/cli/src/analyze/utils.d.ts +0 -4
  787. package/dist/cli/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
  788. package/dist/cli/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
  789. package/dist/cli/src/builtin/specialExpressions/comment.d.ts +0 -5
  790. package/dist/cli/src/builtin/specialExpressions/declared.d.ts +0 -5
  791. package/dist/cli/src/builtin/specialExpressions/defs.d.ts +0 -5
  792. package/dist/cli/src/builtin/specialExpressions/do.d.ts +0 -6
  793. package/dist/cli/src/builtin/specialExpressions/if-let.d.ts +0 -10
  794. package/dist/cli/src/builtin/specialExpressions/if-not.d.ts +0 -6
  795. package/dist/cli/src/builtin/specialExpressions/time.d.ts +0 -6
  796. package/dist/cli/src/builtin/specialExpressions/when-first.d.ts +0 -7
  797. package/dist/cli/src/builtin/specialExpressions/when-let.d.ts +0 -7
  798. package/dist/cli/src/builtin/specialExpressions/when-not.d.ts +0 -6
  799. package/dist/cli/src/builtin/specialExpressions/when.d.ts +0 -6
  800. package/dist/cli/src/identifier.d.ts +0 -8
  801. package/dist/cli/src/parser/index.d.ts +0 -3
  802. package/dist/cli/src/parser/interface.d.ts +0 -155
  803. package/dist/cli/src/parser/parsers.d.ts +0 -4
  804. package/dist/cli/src/removeCommentNodes/index.d.ts +0 -11
  805. package/dist/cli/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
  806. package/dist/cli/src/reservedNames.d.ts +0 -7
  807. package/dist/cli/src/tokenizer/index.d.ts +0 -9
  808. package/dist/cli/src/tokenizer/interface.d.ts +0 -35
  809. package/dist/cli/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
  810. package/dist/cli/src/tokenizer/sugar/index.d.ts +0 -3
  811. package/dist/cli/src/typeGuards/token.d.ts +0 -13
  812. package/dist/cli/src/unparser/UnparseOptions.d.ts +0 -15
  813. package/dist/cli/src/unparser/unparse.d.ts +0 -5
  814. package/dist/cli/src/unparser/unparseArrayLiteral.d.ts +0 -3
  815. package/dist/cli/src/unparser/unparseBindings.d.ts +0 -3
  816. package/dist/cli/src/unparser/unparseNormalExpression.d.ts +0 -3
  817. package/dist/cli/src/unparser/unparseObjectLiteral.d.ts +0 -3
  818. package/dist/cli/src/unparser/unparseParams.d.ts +0 -17
  819. package/dist/cli/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  820. package/dist/cli/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  821. package/dist/cli/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  822. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  823. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  824. package/dist/cli/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  825. package/dist/cli/src/unparser/utils.d.ts +0 -5
  826. package/dist/common/clojureDocs.d.ts +0 -1
  827. package/dist/reference/categories/array.d.ts +0 -3
  828. package/dist/reference/categories/assert.d.ts +0 -3
  829. package/dist/reference/categories/bitwise.d.ts +0 -3
  830. package/dist/reference/categories/collection.d.ts +0 -3
  831. package/dist/reference/categories/functional.d.ts +0 -3
  832. package/dist/reference/categories/math.d.ts +0 -3
  833. package/dist/reference/categories/misc.d.ts +0 -3
  834. package/dist/reference/categories/object.d.ts +0 -3
  835. package/dist/reference/categories/predicate.d.ts +0 -3
  836. package/dist/reference/categories/regularExpression.d.ts +0 -3
  837. package/dist/reference/categories/sequence.d.ts +0 -3
  838. package/dist/reference/categories/specialExpressions.d.ts +0 -3
  839. package/dist/reference/categories/string.d.ts +0 -3
  840. package/dist/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  841. package/dist/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  842. package/dist/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  843. package/dist/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  844. package/dist/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  845. package/dist/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  846. package/dist/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  847. package/dist/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  848. package/dist/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  849. package/dist/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  850. package/dist/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  851. package/dist/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  852. package/dist/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  853. package/dist/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  854. package/dist/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  855. package/dist/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  856. package/dist/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  857. package/dist/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  858. package/dist/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
  859. package/dist/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  860. package/dist/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  861. package/dist/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  862. package/dist/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  863. package/dist/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  864. package/dist/src/analyze/calculateOutcomes/index.d.ts +0 -18
  865. package/dist/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  866. package/dist/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
  867. package/dist/src/analyze/index.d.ts +0 -17
  868. package/dist/src/analyze/utils.d.ts +0 -4
  869. package/dist/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
  870. package/dist/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
  871. package/dist/src/builtin/specialExpressions/comment.d.ts +0 -5
  872. package/dist/src/builtin/specialExpressions/declared.d.ts +0 -5
  873. package/dist/src/builtin/specialExpressions/defs.d.ts +0 -5
  874. package/dist/src/builtin/specialExpressions/do.d.ts +0 -6
  875. package/dist/src/builtin/specialExpressions/if-let.d.ts +0 -10
  876. package/dist/src/builtin/specialExpressions/if-not.d.ts +0 -6
  877. package/dist/src/builtin/specialExpressions/time.d.ts +0 -6
  878. package/dist/src/builtin/specialExpressions/when-first.d.ts +0 -7
  879. package/dist/src/builtin/specialExpressions/when-let.d.ts +0 -7
  880. package/dist/src/builtin/specialExpressions/when-not.d.ts +0 -6
  881. package/dist/src/builtin/specialExpressions/when.d.ts +0 -6
  882. package/dist/src/identifier.d.ts +0 -8
  883. package/dist/src/parser/index.d.ts +0 -3
  884. package/dist/src/parser/interface.d.ts +0 -155
  885. package/dist/src/parser/parsers.d.ts +0 -4
  886. package/dist/src/removeCommentNodes/index.d.ts +0 -11
  887. package/dist/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
  888. package/dist/src/reservedNames.d.ts +0 -7
  889. package/dist/src/tokenizer/index.d.ts +0 -9
  890. package/dist/src/tokenizer/interface.d.ts +0 -35
  891. package/dist/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
  892. package/dist/src/tokenizer/sugar/index.d.ts +0 -3
  893. package/dist/src/typeGuards/token.d.ts +0 -13
  894. package/dist/src/unparser/UnparseOptions.d.ts +0 -15
  895. package/dist/src/unparser/__tests__/testFormatter.d.ts +0 -1
  896. package/dist/src/unparser/unparse.d.ts +0 -5
  897. package/dist/src/unparser/unparseArrayLiteral.d.ts +0 -3
  898. package/dist/src/unparser/unparseBindings.d.ts +0 -3
  899. package/dist/src/unparser/unparseNormalExpression.d.ts +0 -3
  900. package/dist/src/unparser/unparseObjectLiteral.d.ts +0 -3
  901. package/dist/src/unparser/unparseParams.d.ts +0 -17
  902. package/dist/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  903. package/dist/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  904. package/dist/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  905. package/dist/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  906. package/dist/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  907. package/dist/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  908. package/dist/src/unparser/utils.d.ts +0 -5
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e){if(!e.position||!e.code)return"";const t=e.position.column-1,r=e.code.length-t-1;return`${" ".repeat(Math.max(t,0))}^${" ".repeat(Math.max(r,0))}`}class t extends Error{sourceCodeInfo;shortMessage;constructor(r,n){const o=r instanceof Error?r.message:`${r}`;super(function(t,r){if(!r)return t;const n=`${r.position.line}:${r.position.column}`;return`${t}${r.filePath?`\n${r.filePath}:${n}`:`\nLocation ${n}`}\n${r.code}\n${e(r)}`}(o,n)),this.shortMessage=o,this.sourceCodeInfo=n,Object.setPrototypeOf(this,t.prototype),this.name="LitsError"}getCodeMarker(){return this.sourceCodeInfo&&e(this.sourceCodeInfo)}}const r={Number:1,String:2,NormalExpression:3,SpecialExpression:4,UserDefinedSymbol:5,NormalBuiltinSymbol:6,SpecialBuiltinSymbol:7,ReservedSymbol:8,Binding:9,Spread:10},n=new Set(Object.values(r));const o=new Set(["UserDefined","Partial","Comp","Constantly","Juxt","Complement","EveryPred","SomePred","Fnull","Builtin","SpecialBuiltin","NativeJsFunction","Module"]);const i="^^fn^^",a="^^re^^";function s(e){return null!==e&&"object"==typeof e&&(i in e&&"functionType"in e&&("string"==typeof(t=e.functionType)&&o.has(t)));var t}function m(e){return!(!Array.isArray(e)||e.length<2)&&("number"==typeof(t=e[0])&&n.has(t));var t}function u(e){return s(e)?`<function ${e.name||"λ"}>`:m(e)?`${t=e[0],Object.keys(r).find(e=>r[e]===t)}-node`:null===e?"null":"object"==typeof e&&e instanceof RegExp?`${e}`:"object"==typeof e&&e instanceof Error?e.toString():JSON.stringify(e);var t}function h(e,t){return e?.sourceCodeInfo??t}function c(e,t={}){return"number"==typeof e&&(!Number.isNaN(e)&&(!(t.integer&&!Number.isInteger(e))&&(!(t.finite&&!Number.isFinite(e))&&((!t.zero||0===e)&&((!t.nonZero||0!==e)&&(!(t.positive&&e<=0)&&(!(t.negative&&e>=0)&&(!(t.nonPositive&&e>0)&&(!(t.nonNegative&&e<0)&&(!("number"==typeof t.gt&&e<=t.gt)&&(!("number"==typeof t.gte&&e<t.gte)&&(!("number"==typeof t.lt&&e>=t.lt)&&!("number"==typeof t.lte&&e>t.lte)))))))))))))}function l(e,r,n={}){if(!c(e,n))throw new t(`Expected ${function(e){if(e.zero)return"zero";const t=function(e){return e.positive?"positive":e.negative?"negative":e.nonNegative?"non negative":e.nonPositive?"non positive":e.nonZero?"non zero":""}(e),r=e.integer?"integer":"number",n=e.finite?"finite":"",o=function(e){return"number"!=typeof e.gt&&"number"!=typeof e.gte||"number"!=typeof e.lt&&"number"!=typeof e.lte?"number"==typeof e.gt||"number"==typeof e.gte?"number"==typeof e.gt?`n > ${e.gt}`:`n >= ${e.gte}`:"number"==typeof e.lt||"number"==typeof e.lte?"number"==typeof e.lt?`n < ${e.lt}`:`n <= ${e.lte}`:"":`${"number"==typeof e.gt?`${e.gt} < n `:`${e.gte} <= n `}${"number"==typeof e.lt?`< ${e.lt}`:`<= ${e.lte}`}`}(e);return[t,n,r,o].filter(e=>!!e).join(" ")}(n)}, got ${u(e)}.`,h(e,r))}const p=new WeakSet,y=new WeakSet,b=new WeakSet;function g(e,r){if(!function(e){return!(!Array.isArray(e)||!y.has(e)&&(b.has(e)||(e.every(e=>c(e))?(p.add(e),y.add(e),0):(b.add(e),1))))}(e))throw new t(`Expected a vector, but got ${e}`,r)}function f(e,r,n){return new t(`Expected ${e}, got ${u(r)}.`,h(r,n))}function d(e,t){if(!Array.isArray(e))throw f("array",e,t)}function q(e){return null!==e&&"object"==typeof e&&!!e[i]}function v(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof RegExp||q(e)||(t=e,null!==t&&"object"==typeof t&&t[a]));var t}function k(e){return function(e){return Array.isArray(e)||"string"==typeof e}(e)||v(e)}function w(e,t){if(!function(e){return"number"==typeof e||!!k(e)||!!q(e)}(e))throw f("FunctionLike",e,t)}function x(e){return{min:e,max:e}}const A={"abundant-seq":{category:"number-theory",description:"Generates the abundant numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { abundant-seq } = import("number-theory");\nabundant-seq(1)','let { abundant-seq } = import("number-theory");\nabundant-seq(5)'],seeAlso:["number-theory.abundant-nth","number-theory.abundant-take-while","number-theory.abundant?","number-theory.deficient-seq","number-theory.perfect-seq"]},"abundant-take-while":{category:"number-theory",description:"Generates the abundant numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { abundant-take-while } = import("number-theory");\nabundant-take-while(-> $ < 100)'],seeAlso:["number-theory.abundant-seq","number-theory.abundant-nth","number-theory.abundant?"]},"abundant-nth":{category:"number-theory",description:"Generates the nth term of the abundant numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the number in the sequence."}},variants:[{argumentNames:["n"]}],examples:['let { abundant-nth } = import("number-theory");\nabundant-nth(1)','let { abundant-nth } = import("number-theory");\nabundant-nth(5)'],seeAlso:["number-theory.abundant-seq","number-theory.abundant-take-while","number-theory.abundant?"]},"abundant?":{category:"number-theory",description:"Checks if a number is abundant.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { abundant? } = import("number-theory");\nabundant?(12)','let { abundant? } = import("number-theory");\nabundant?(15)'],seeAlso:["number-theory.abundant-seq","number-theory.abundant-nth","number-theory.deficient?","number-theory.perfect?","number-theory.sigma","number-theory.divisors","number-theory.abundant-take-while"]},"arithmetic-seq":{category:"number-theory",description:"Generates the arithmetic sequence for a given $start, $step, and $length.",returns:{type:"integer",array:!0},args:{start:{type:"number",description:"The starting term of the sequence."},step:{type:"number",description:"The common difference of the sequence."},length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["start","step","length"]}],examples:['let { arithmetic-seq } = import("number-theory");\narithmetic-seq(3, 2, 2)','let { arithmetic-seq } = import("number-theory");\narithmetic-seq(2, 3, 2)','let { arithmetic-seq } = import("number-theory");\narithmetic-seq(1, 2, 2)','let { arithmetic-seq } = import("number-theory");\narithmetic-seq(1, 1.5, 12)'],seeAlso:["number-theory.arithmetic-nth","number-theory.arithmetic-take-while","number-theory.arithmetic?","number-theory.geometric-seq"]},"arithmetic-take-while":{category:"number-theory",description:"Generates the arithmetic sequence while a condition is met.",returns:{type:"integer",array:!0},args:{start:{type:"number",description:"The starting term of the sequence."},step:{type:"number",description:"The common difference of the sequence."},takeWhile:{type:"function",description:"A function that takes a number and an index and returns a boolean."}},variants:[{argumentNames:["start","step","takeWhile"]}],examples:['let { arithmetic-take-while } = import("number-theory");\narithmetic-take-while(1, 0.25, -> $ < 3)'],seeAlso:["number-theory.arithmetic-seq","number-theory.arithmetic-nth","number-theory.arithmetic?"]},"arithmetic-nth":{category:"number-theory",description:"Generates the nth term of the arithmetic sequence.",returns:{type:"integer"},args:{start:{type:"number",description:"The starting term of the sequence."},step:{type:"number",description:"The common difference of the sequence."},n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["start","step","n"]}],examples:['let { arithmetic-nth } = import("number-theory");\narithmetic-nth(3, 2, 2)','let { arithmetic-nth } = import("number-theory");\narithmetic-nth(2, 3, 2)','let { arithmetic-nth } = import("number-theory");\narithmetic-nth(1, 2, 2)','let { arithmetic-nth } = import("number-theory");\narithmetic-nth(1, 1.5, 12)'],seeAlso:["number-theory.arithmetic-seq","number-theory.arithmetic-take-while","number-theory.arithmetic?"]},"arithmetic?":{category:"number-theory",description:"Checks if a number is part of the arithmetic sequence.",returns:{type:"boolean"},args:{start:{type:"number",description:"The starting term of the sequence."},step:{type:"number",description:"The common difference of the sequence."},n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["start","step","n"]}],examples:['let { arithmetic? } = import("number-theory");\narithmetic?(3, 2, 2)','let { arithmetic? } = import("number-theory");\narithmetic?(2, 3, 2)','let { arithmetic? } = import("number-theory");\narithmetic?(1, 2, 2)','let { arithmetic? } = import("number-theory");\narithmetic?(1, 1.5, 12)'],seeAlso:["number-theory.arithmetic-seq","number-theory.arithmetic-nth","number-theory.geometric?","number-theory.arithmetic-take-while"]},"bell-seq":{category:"number-theory",description:"Generates the Bell sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 22 (the maximum length of the pre-calculated bell numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { bell-seq } = import("number-theory");\nbell-seq(5)','let { bell-seq } = import("number-theory");\nbell-seq(10)','let { bell-seq } = import("number-theory");\nbell-seq()'],seeAlso:["number-theory.bell-nth","number-theory.bell-take-while","number-theory.bell?","number-theory.catalan-seq","number-theory.stirling-second","number-theory.stirling-first"]},"bell-take-while":{category:"number-theory",description:"Generates the Bell sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { bell-take-while } = import("number-theory");\nbell-take-while(-> $ < 1000)'],seeAlso:["number-theory.bell-seq","number-theory.bell-nth","number-theory.bell?"]},"bell-nth":{category:"number-theory",description:"Generates the nth term of the Bell sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { bell-nth } = import("number-theory");\nbell-nth(5)','let { bell-nth } = import("number-theory");\nbell-nth(10)'],seeAlso:["number-theory.bell-seq","number-theory.bell-take-while","number-theory.bell?"]},"bell?":{category:"number-theory",description:"Checks if a number is in the Bell sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { bell? } = import("number-theory");\nbell?(1)','let { bell? } = import("number-theory");\nbell?(27644437)','let { bell? } = import("number-theory");\nbell?(27644436)'],seeAlso:["number-theory.bell-seq","number-theory.bell-nth","number-theory.catalan?","number-theory.bell-take-while"]},"bernoulli-seq":{category:"number-theory",description:"Generates the Bernoulli sequence up to a specified length.",returns:{type:"number",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { bernoulli-seq } = import("number-theory");\nbernoulli-seq(5)','let { bernoulli-seq } = import("number-theory");\nbernoulli-seq(10)'],seeAlso:["number-theory.bernoulli-nth","number-theory.bernoulli-take-while"]},"bernoulli-take-while":{category:"number-theory",description:"Generates the Bernoulli sequence while a condition is met.",returns:{type:"number",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { bernoulli-take-while } = import("number-theory");\nbernoulli-take-while(-> abs($) < 100)'],seeAlso:["number-theory.bernoulli-seq","number-theory.bernoulli-nth"]},"bernoulli-nth":{category:"number-theory",description:"Generates the nth term of the Bernoulli sequence.",returns:{type:"number"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { bernoulli-nth } = import("number-theory");\nbernoulli-nth(5)','let { bernoulli-nth } = import("number-theory");\nbernoulli-nth(10)','let { bernoulli-nth } = import("number-theory");\nbernoulli-nth(23)'],seeAlso:["number-theory.bernoulli-seq","number-theory.bernoulli-take-while"]},"catalan-seq":{category:"number-theory",description:"Generates the Catalan sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 30 (the maximum length of the pre-calculated catalan numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { catalan-seq } = import("number-theory");\ncatalan-seq(5)','let { catalan-seq } = import("number-theory");\ncatalan-seq(10)','let { catalan-seq } = import("number-theory");\ncatalan-seq()'],seeAlso:["number-theory.catalan-nth","number-theory.catalan-take-while","number-theory.catalan?","number-theory.bell-seq"]},"catalan-take-while":{category:"number-theory",description:"Generates the Catalan sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { catalan-take-while } = import("number-theory");\ncatalan-take-while(-> $ < 1000)'],seeAlso:["number-theory.catalan-seq","number-theory.catalan-nth","number-theory.catalan?"]},"catalan-nth":{category:"number-theory",description:"Generates the nth term of the Catalan sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { catalan-nth } = import("number-theory");\ncatalan-nth(5)','let { catalan-nth } = import("number-theory");\ncatalan-nth(10)'],seeAlso:["number-theory.catalan-seq","number-theory.catalan-take-while","number-theory.catalan?"]},"catalan?":{category:"number-theory",description:"Determines if a number is in the Catalan sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { catalan? } = import("number-theory");\ncatalan?(5)','let { catalan? } = import("number-theory");\ncatalan?(10)'],seeAlso:["number-theory.catalan-seq","number-theory.catalan-nth","number-theory.bell?","number-theory.catalan-take-while"]},"collatz-seq":{category:"number-theory",description:"Generates the collatz sequence starting from a given integer.",returns:{type:"integer",array:!0},args:{start:{type:"integer",description:"The starting integer for the collatz sequence."}},variants:[{argumentNames:["start"]}],examples:['let { collatz-seq } = import("number-theory");\ncollatz-seq(3)','let { collatz-seq } = import("number-theory");\ncollatz-seq(11)'],seeAlso:["number-theory.juggler-seq"]},"composite-seq":{category:"number-theory",description:"Generates the composite sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { composite-seq } = import("number-theory");\ncomposite-seq(1)','let { composite-seq } = import("number-theory");\ncomposite-seq(2)','let { composite-seq } = import("number-theory");\ncomposite-seq(10)'],seeAlso:["number-theory.composite-nth","number-theory.composite-take-while","number-theory.composite?","number-theory.prime-seq"]},"composite-take-while":{category:"number-theory",description:"Generates the composite sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { composite-take-while } = import("number-theory");\ncomposite-take-while(-> $ < 50)'],seeAlso:["number-theory.composite-seq","number-theory.composite-nth","number-theory.composite?"]},"composite-nth":{category:"number-theory",description:"Generates the nth term of the composite sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the composite number to retrieve."}},variants:[{argumentNames:["n"]}],examples:['let { composite-nth } = import("number-theory");\ncomposite-nth(1)','let { composite-nth } = import("number-theory");\ncomposite-nth(2)','let { composite-nth } = import("number-theory");\ncomposite-nth(10)'],seeAlso:["number-theory.composite-seq","number-theory.composite-take-while","number-theory.composite?"]},"composite?":{category:"number-theory",description:"Determines if a number is composite.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { composite? } = import("number-theory");\ncomposite?(4)','let { composite? } = import("number-theory");\ncomposite?(5)','let { composite? } = import("number-theory");\ncomposite?(11)'],seeAlso:["number-theory.composite-seq","number-theory.composite-nth","number-theory.prime?","number-theory.prime-factors","number-theory.composite-take-while"]},"deficient-seq":{category:"number-theory",description:"Generates the deficient numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { deficient-seq } = import("number-theory");\ndeficient-seq(1)','let { deficient-seq } = import("number-theory");\ndeficient-seq(5)'],seeAlso:["number-theory.deficient-nth","number-theory.deficient-take-while","number-theory.deficient?","number-theory.abundant-seq","number-theory.perfect-seq"]},"deficient-take-while":{category:"number-theory",description:"Generates the deficient numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { deficient-take-while } = import("number-theory");\ndeficient-take-while(-> $ < 100)'],seeAlso:["number-theory.deficient-seq","number-theory.deficient-nth","number-theory.deficient?"]},"deficient-nth":{category:"number-theory",description:"Generates the nth term of the deficient numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the number in the sequence."}},variants:[{argumentNames:["n"]}],examples:['let { deficient-nth } = import("number-theory");\ndeficient-nth(5)','let { deficient-nth } = import("number-theory");\ndeficient-nth(12)'],seeAlso:["number-theory.deficient-seq","number-theory.deficient-take-while","number-theory.deficient?"]},"deficient?":{category:"number-theory",description:"Checks if a number is deficient.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { deficient? } = import("number-theory");\ndeficient?(12)','let { deficient? } = import("number-theory");\ndeficient?(15)'],seeAlso:["number-theory.deficient-seq","number-theory.deficient-nth","number-theory.abundant?","number-theory.perfect?","number-theory.sigma","number-theory.divisors","number-theory.deficient-take-while"]},"factorial-seq":{category:"number-theory",description:"Generates the factorial sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 19 (the maximum length of the pre-calculated factorial numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { factorial-seq } = import("number-theory");\nfactorial-seq(1)','let { factorial-seq } = import("number-theory");\nfactorial-seq(2)','let { factorial-seq } = import("number-theory");\nfactorial-seq(3)','let { factorial-seq } = import("number-theory");\nfactorial-seq(4)','let { factorial-seq } = import("number-theory");\nfactorial-seq(5)','let { factorial-seq } = import("number-theory");\nfactorial-seq(10)'],seeAlso:["number-theory.factorial-nth","number-theory.factorial-take-while","number-theory.factorial?","number-theory.factorial"]},"factorial-take-while":{category:"number-theory",description:"Generates the factorial sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { factorial-take-while } = import("number-theory");\nfactorial-take-while(-> $ < 1000)'],seeAlso:["number-theory.factorial-seq","number-theory.factorial-nth","number-theory.factorial?"]},"factorial-nth":{category:"number-theory",description:"Generates the nth term of the factorial sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { factorial-nth } = import("number-theory");\nfactorial-nth(1)','let { factorial-nth } = import("number-theory");\nfactorial-nth(2)','let { factorial-nth } = import("number-theory");\nfactorial-nth(3)','let { factorial-nth } = import("number-theory");\nfactorial-nth(4)','let { factorial-nth } = import("number-theory");\nfactorial-nth(5)','let { factorial-nth } = import("number-theory");\nfactorial-nth(10)'],seeAlso:["number-theory.factorial-seq","number-theory.factorial-take-while","number-theory.factorial?","number-theory.factorial"]},"factorial?":{category:"number-theory",description:"Checks if a number is in the factorial sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { factorial? } = import("number-theory");\nfactorial?(1)','let { factorial? } = import("number-theory");\nfactorial?(2)','let { factorial? } = import("number-theory");\nfactorial?(3)','let { factorial? } = import("number-theory");\nfactorial?(4)','let { factorial? } = import("number-theory");\nfactorial?(5)','let { factorial? } = import("number-theory");\nfactorial?(6)','let { factorial? } = import("number-theory");\nfactorial?(7)','let { factorial? } = import("number-theory");\nfactorial?(8)','let { factorial? } = import("number-theory");\nfactorial?(9)','let { factorial? } = import("number-theory");\nfactorial?(3628800)'],seeAlso:["number-theory.factorial-seq","number-theory.factorial-nth","number-theory.factorial","number-theory.factorial-take-while"]},"fibonacci-seq":{category:"number-theory",description:"Generates the fibonacci sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 79 (the maximum length of the pre-calculated Fibonacci numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { fibonacci-seq } = import("number-theory");\nfibonacci-seq(1)','let { fibonacci-seq } = import("number-theory");\nfibonacci-seq(2)','let { fibonacci-seq } = import("number-theory");\nfibonacci-seq()'],seeAlso:["number-theory.fibonacci-nth","number-theory.fibonacci-take-while","number-theory.fibonacci?","number-theory.lucas-seq","number-theory.tribonacci-seq","number-theory.pell-seq","number-theory.padovan-seq"]},"fibonacci-take-while":{category:"number-theory",description:"Generates the fibonacci sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { fibonacci-take-while } = import("number-theory");\nfibonacci-take-while(-> $ < 100)'],seeAlso:["number-theory.fibonacci-seq","number-theory.fibonacci-nth","number-theory.fibonacci?"]},"fibonacci-nth":{category:"number-theory",description:"Generates the nth term of the fibonacci sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { fibonacci-nth } = import("number-theory");\nfibonacci-nth(5)','let { fibonacci-nth } = import("number-theory");\nfibonacci-nth(50)'],seeAlso:["number-theory.fibonacci-seq","number-theory.fibonacci-take-while","number-theory.fibonacci?"]},"fibonacci?":{category:"number-theory",description:"Determines if a number is in the fibonacci sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { fibonacci? } = import("number-theory");\nfibonacci?(0)','let { fibonacci? } = import("number-theory");\nfibonacci?(1)','let { fibonacci? } = import("number-theory");\nfibonacci?(2)','let { fibonacci? } = import("number-theory");\nfibonacci?(3)','let { fibonacci? } = import("number-theory");\nfibonacci?(4)','let { fibonacci? } = import("number-theory");\nfibonacci?(5)','let { fibonacci? } = import("number-theory");\nfibonacci?(6)','let { fibonacci? } = import("number-theory");\nfibonacci?(7)','let { fibonacci? } = import("number-theory");\nfibonacci?(8)','let { fibonacci? } = import("number-theory");\nfibonacci?(9)'],seeAlso:["number-theory.fibonacci-seq","number-theory.fibonacci-nth","number-theory.lucas?","number-theory.fibonacci-take-while","number-theory.tribonacci?","number-theory.padovan?","number-theory.pell?"]},"geometric-seq":{category:"number-theory",description:"Generates the geometric sequence for a given $start, $ratio, and $length.",returns:{type:"integer",array:!0},args:{start:{type:"number",description:"The starting term of the sequence."},ratio:{type:"number",description:"The common ratio of the sequence."},length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["start","ratio","length"]}],examples:['let { geometric-seq } = import("number-theory");\ngeometric-seq(3, 2, 2)','let { geometric-seq } = import("number-theory");\ngeometric-seq(2, 3, 2)','let { geometric-seq } = import("number-theory");\ngeometric-seq(1, 2, 2)','let { geometric-seq } = import("number-theory");\ngeometric-seq(1, 1.5, 12)'],seeAlso:["number-theory.geometric-nth","number-theory.geometric-take-while","number-theory.geometric?","number-theory.arithmetic-seq"]},"geometric-take-while":{category:"number-theory",description:"Generates the geometric sequence while a condition is met.",returns:{type:"integer",array:!0},args:{start:{type:"number",description:"The starting term of the sequence."},ratio:{type:"number",description:"The common ratio of the sequence."},takeWhile:{type:"function",description:"A function that takes a number and an index and returns a boolean."}},variants:[{argumentNames:["start","ratio","takeWhile"]}],examples:['let { geometric-take-while } = import("number-theory");\ngeometric-take-while(1, 1.5, -> $ < 10)'],seeAlso:["number-theory.geometric-seq","number-theory.geometric-nth","number-theory.geometric?"]},"geometric-nth":{category:"number-theory",description:"Generates the nth term of the geometric sequence.",returns:{type:"integer"},args:{start:{type:"number",description:"The starting term of the sequence."},ratio:{type:"number",description:"The common ratio of the sequence."},n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["start","ratio","n"]}],examples:['let { geometric-nth } = import("number-theory");\ngeometric-nth(3, 2, 2)','let { geometric-nth } = import("number-theory");\ngeometric-nth(2, 3, 2)','let { geometric-nth } = import("number-theory");\ngeometric-nth(1, 2, 2)','let { geometric-nth } = import("number-theory");\ngeometric-nth(1, 1.5, 4)'],seeAlso:["number-theory.geometric-seq","number-theory.geometric-take-while","number-theory.geometric?"]},"geometric?":{category:"number-theory",description:"Checks if a number is in the geometric sequence.",returns:{type:"boolean"},args:{start:{type:"number",description:"The starting term of the sequence."},ratio:{type:"number",description:"The common ratio of the sequence."},n:{type:"number",description:"The number to check."}},variants:[{argumentNames:["start","ratio","n"]}],examples:['let { geometric? } = import("number-theory");\ngeometric?(1, 2, 1)','let { geometric? } = import("number-theory");\ngeometric?(2, 3, 2)','let { geometric? } = import("number-theory");\ngeometric?(3, 2, 2)','let { geometric? } = import("number-theory");\ngeometric?(1, 1.5, 2.25)','let { geometric? } = import("number-theory");\ngeometric?(1, 1.5, -4)'],seeAlso:["number-theory.geometric-seq","number-theory.geometric-nth","number-theory.arithmetic?","number-theory.geometric-take-while"]},"golomb-seq":{category:"number-theory",description:"Generates the Golomb sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { golomb-seq } = import("number-theory");\ngolomb-seq(5)','let { golomb-seq } = import("number-theory");\ngolomb-seq(20)'],seeAlso:["number-theory.golomb-nth","number-theory.golomb-take-while","number-theory.golomb?","number-theory.recaman-seq"]},"golomb-take-while":{category:"number-theory",description:"Generates the Golomb sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { golomb-take-while } = import("number-theory");\ngolomb-take-while(-> $ <= 10)'],seeAlso:["number-theory.golomb-seq","number-theory.golomb-nth","number-theory.golomb?"]},"golomb-nth":{category:"number-theory",description:"Generates the nth term of the Golomb sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { golomb-nth } = import("number-theory");\ngolomb-nth(5)','let { golomb-nth } = import("number-theory");\ngolomb-nth(1000)'],seeAlso:["number-theory.golomb-seq","number-theory.golomb-take-while","number-theory.golomb?"]},"golomb?":{category:"number-theory",description:"Checks if a number is in the Golomb sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { golomb? } = import("number-theory");\ngolomb?(1)','let { golomb? } = import("number-theory");\ngolomb?(2)','let { golomb? } = import("number-theory");\ngolomb?(3345)','let { golomb? } = import("number-theory");\ngolomb?(67867864)'],seeAlso:["number-theory.golomb-seq","number-theory.golomb-nth","number-theory.golomb-take-while"]},"happy-seq":{category:"number-theory",description:"Generates the happy sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 20 (the maximum length of the pre-calculated happy numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { happy-seq } = import("number-theory");\nhappy-seq(1)','let { happy-seq } = import("number-theory");\nhappy-seq(2)','let { happy-seq } = import("number-theory");\nhappy-seq(20)'],seeAlso:["number-theory.happy-nth","number-theory.happy-take-while","number-theory.happy?","number-theory.lucky-seq"]},"happy-take-while":{category:"number-theory",description:"Generates the happy sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { happy-take-while } = import("number-theory");\nhappy-take-while(-> $ < 100)'],seeAlso:["number-theory.happy-seq","number-theory.happy-nth","number-theory.happy?"]},"happy-nth":{category:"number-theory",description:"Generates the nth term of the happy sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the happy number to return."}},variants:[{argumentNames:["n"]}],examples:['let { happy-nth } = import("number-theory");\nhappy-nth(1)','let { happy-nth } = import("number-theory");\nhappy-nth(2)','let { happy-nth } = import("number-theory");\nhappy-nth(20)'],seeAlso:["number-theory.happy-seq","number-theory.happy-take-while","number-theory.happy?"]},"happy?":{category:"number-theory",description:"Determines if a number is a happy number.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { happy? } = import("number-theory");\nhappy?(1)','let { happy? } = import("number-theory");\nhappy?(2)','let { happy? } = import("number-theory");\nhappy?(100)'],seeAlso:["number-theory.happy-seq","number-theory.happy-nth","number-theory.happy-take-while"]},"juggler-seq":{category:"number-theory",description:"Generates the Juggler sequence starting from a given integer.",returns:{type:"integer",array:!0},args:{start:{type:"integer",description:"The starting integer for the Juggler sequence."}},variants:[{argumentNames:["start"]}],examples:['let { juggler-seq } = import("number-theory");\njuggler-seq(3)','let { juggler-seq } = import("number-theory");\njuggler-seq(5)'],seeAlso:["number-theory.collatz-seq"]},"look-and-say-seq":{category:"number-theory",description:"Generates the Look-and-Say sequence up to a specified length.",returns:{type:"string",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { look-and-say-seq } = import("number-theory");\nlook-and-say-seq(5)'],seeAlso:["number-theory.look-and-say-nth","number-theory.look-and-say-take-while","number-theory.look-and-say?"]},"look-and-say-take-while":{category:"number-theory",description:"Generates the Look-and-Say sequence while a condition is met.",returns:{type:"string",array:!0},args:{takeWhile:{type:"function",description:"A function that takes a string and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { look-and-say-take-while } = import("number-theory");\nlook-and-say-take-while((term, index) -> count(term) < 10)','let { look-and-say-take-while } = import("number-theory");\nlook-and-say-take-while(-> $2 <= 10)'],seeAlso:["number-theory.look-and-say-seq","number-theory.look-and-say-nth","number-theory.look-and-say?"]},"look-and-say-nth":{category:"number-theory",description:"Generates the nth term of the Look-and-Say sequence.",returns:{type:"string"},args:{n:{type:"integer",description:"The index of the term in the sequence."}},variants:[{argumentNames:["n"]}],examples:['let { look-and-say-nth } = import("number-theory");\nlook-and-say-nth(5)'],seeAlso:["number-theory.look-and-say-seq","number-theory.look-and-say-take-while","number-theory.look-and-say?"]},"look-and-say?":{category:"number-theory",description:"Checks if a string is a valid Look-and-Say term.",returns:{type:"boolean"},args:{term:{type:"string",description:"The term to check."}},variants:[{argumentNames:["term"]}],examples:['let { look-and-say? } = import("number-theory");\nlook-and-say?("111221")','let { look-and-say? } = import("number-theory");\nlook-and-say?("123")'],seeAlso:["number-theory.look-and-say-seq","number-theory.look-and-say-nth","number-theory.look-and-say-take-while"]},"lucas-seq":{category:"number-theory",description:"Generates the lucas sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 77 (the maximum length of the pre-calculated Lucas numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { lucas-seq } = import("number-theory");\nlucas-seq(1)','let { lucas-seq } = import("number-theory");\nlucas-seq(2)','let { lucas-seq } = import("number-theory");\nlucas-seq()'],seeAlso:["number-theory.lucas-nth","number-theory.lucas-take-while","number-theory.lucas?","number-theory.fibonacci-seq"]},"lucas-take-while":{category:"number-theory",description:"Generates the lucas sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { lucas-take-while } = import("number-theory");\nlucas-take-while(-> $ < 100)'],seeAlso:["number-theory.lucas-seq","number-theory.lucas-nth","number-theory.lucas?"]},"lucas-nth":{category:"number-theory",description:"Generates the nth term of the lucas sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { lucas-nth } = import("number-theory");\nlucas-nth(1)','let { lucas-nth } = import("number-theory");\nlucas-nth(2)','let { lucas-nth } = import("number-theory");\nlucas-nth(10)'],seeAlso:["number-theory.lucas-seq","number-theory.lucas-take-while","number-theory.lucas?"]},"lucas?":{category:"number-theory",description:"Determines if a number is in the lucas sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { lucas? } = import("number-theory");\nlucas?(1)','let { lucas? } = import("number-theory");\nlucas?(2)','let { lucas? } = import("number-theory");\nlucas?(10)'],seeAlso:["number-theory.lucas-seq","number-theory.lucas-nth","number-theory.fibonacci?","number-theory.lucas-take-while"]},"lucky-seq":{category:"number-theory",description:"Generates the lucky sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { lucky-seq } = import("number-theory");\nlucky-seq(1)','let { lucky-seq } = import("number-theory");\nlucky-seq(2)','let { lucky-seq } = import("number-theory");\nlucky-seq(20)'],seeAlso:["number-theory.lucky-nth","number-theory.lucky-take-while","number-theory.lucky?","number-theory.happy-seq","number-theory.prime-seq"]},"lucky-take-while":{category:"number-theory",description:"Generates the lucky sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { lucky-take-while } = import("number-theory");\nlucky-take-while(-> $ < 100)'],seeAlso:["number-theory.lucky-seq","number-theory.lucky-nth","number-theory.lucky?"]},"lucky-nth":{category:"number-theory",description:"Generates the nth term of the lucky sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The position in the sequence."}},variants:[{argumentNames:["n"]}],examples:['let { lucky-nth } = import("number-theory");\nlucky-nth(1)','let { lucky-nth } = import("number-theory");\nlucky-nth(2)','let { lucky-nth } = import("number-theory");\nlucky-nth(20)'],seeAlso:["number-theory.lucky-seq","number-theory.lucky-take-while","number-theory.lucky?"]},"lucky?":{category:"number-theory",description:"Checks if a number is a lucky number.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { lucky? } = import("number-theory");\nlucky?(4)','let { lucky? } = import("number-theory");\nlucky?(7)','let { lucky? } = import("number-theory");\nlucky?(33)'],seeAlso:["number-theory.lucky-seq","number-theory.lucky-nth","number-theory.prime?","number-theory.lucky-take-while"]},"mersenne-seq":{category:"number-theory",description:"Generates the Mersenne sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 9 (the maximum length of the pre-calculated mersenne numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { mersenne-seq } = import("number-theory");\nmersenne-seq(1)','let { mersenne-seq } = import("number-theory");\nmersenne-seq(5)','let { mersenne-seq } = import("number-theory");\nmersenne-seq()'],seeAlso:["number-theory.mersenne-nth","number-theory.mersenne-take-while","number-theory.mersenne?","number-theory.prime-seq"]},"mersenne-take-while":{category:"number-theory",description:"Generates the Mersenne sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { mersenne-take-while } = import("number-theory");\nmersenne-take-while(-> $ < 1000)'],seeAlso:["number-theory.mersenne-seq","number-theory.mersenne-nth","number-theory.mersenne?"]},"mersenne-nth":{category:"number-theory",description:"Generates the nth term of the Mersenne sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { mersenne-nth } = import("number-theory");\nmersenne-nth(1)','let { mersenne-nth } = import("number-theory");\nmersenne-nth(5)'],seeAlso:["number-theory.mersenne-seq","number-theory.mersenne-take-while","number-theory.mersenne?"]},"mersenne?":{category:"number-theory",description:"Checks if a number is in the Mersenne sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { mersenne? } = import("number-theory");\nmersenne?(3)','let { mersenne? } = import("number-theory");\nmersenne?(4)','let { mersenne? } = import("number-theory");\nmersenne?(7)'],seeAlso:["number-theory.mersenne-seq","number-theory.mersenne-nth","number-theory.prime?","number-theory.mersenne-take-while"]},"padovan-seq":{category:"number-theory",description:"Generates the Padovan sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { padovan-seq } = import("number-theory");\npadovan-seq(5)','let { padovan-seq } = import("number-theory");\npadovan-seq(10)','let { padovan-seq } = import("number-theory");\npadovan-seq(20)'],seeAlso:["number-theory.padovan-nth","number-theory.padovan-take-while","number-theory.padovan?","number-theory.fibonacci-seq"]},"padovan-take-while":{category:"number-theory",description:"Generates the Padovan sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { padovan-take-while } = import("number-theory");\npadovan-take-while(-> $ < 1000)'],seeAlso:["number-theory.padovan-seq","number-theory.padovan-nth","number-theory.padovan?"]},"padovan-nth":{category:"number-theory",description:"Generates the nth term of the Padovan sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { padovan-nth } = import("number-theory");\npadovan-nth(5)','let { padovan-nth } = import("number-theory");\npadovan-nth(10)','let { padovan-nth } = import("number-theory");\npadovan-nth(20)'],seeAlso:["number-theory.padovan-seq","number-theory.padovan-take-while","number-theory.padovan?"]},"padovan?":{category:"number-theory",description:"Checks if a number is in the Padovan sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { padovan? } = import("number-theory");\npadovan?(1)','let { padovan? } = import("number-theory");\npadovan?(265)','let { padovan? } = import("number-theory");\npadovan?(6)'],seeAlso:["number-theory.padovan-seq","number-theory.padovan-nth","number-theory.fibonacci?","number-theory.padovan-take-while"]},"partition-seq":{category:"number-theory",description:"Generates the partition numbers up to a specified length. If no length is provided, it defaults to 299 (the maximum length of the pre-calculated partition numbers).",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { partition-seq } = import("number-theory");\npartition-seq(1)','let { partition-seq } = import("number-theory");\npartition-seq(10)','let { partition-seq } = import("number-theory");\npartition-seq()'],seeAlso:["number-theory.partition-nth","number-theory.partition-take-while","number-theory.partition?","number-theory.partitions","number-theory.count-partitions"]},"partition-take-while":{category:"number-theory",description:"Generates the partition numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { partition-take-while } = import("number-theory");\npartition-take-while(-> $ < 1000)'],seeAlso:["number-theory.partition-seq","number-theory.partition-nth","number-theory.partition?"]},"partition-nth":{category:"number-theory",description:"Generates the nth term of the partition numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the partition number to generate."}},variants:[{argumentNames:["n"]}],examples:['let { partition-nth } = import("number-theory");\npartition-nth(1)','let { partition-nth } = import("number-theory");\npartition-nth(5)'],seeAlso:["number-theory.partition-seq","number-theory.partition-take-while","number-theory.partition?"]},"partition?":{category:"number-theory",description:"Checks if a number is in the partition numbers.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { partition? } = import("number-theory");\npartition?(0)','let { partition? } = import("number-theory");\npartition?(1)','let { partition? } = import("number-theory");\npartition?(2)','let { partition? } = import("number-theory");\npartition?(3)','let { partition? } = import("number-theory");\npartition?(4)','let { partition? } = import("number-theory");\npartition?(5)'],seeAlso:["number-theory.partition-seq","number-theory.partition-nth","number-theory.partitions","number-theory.partition-take-while"]},"pell-seq":{category:"number-theory",description:"Generates the Pell sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 42 (the maximum length of the pre-calculated Pell numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { pell-seq } = import("number-theory");\npell-seq(5)','let { pell-seq } = import("number-theory");\npell-seq(10)','let { pell-seq } = import("number-theory");\npell-seq()'],seeAlso:["number-theory.pell-nth","number-theory.pell-take-while","number-theory.pell?","number-theory.fibonacci-seq"]},"pell-take-while":{category:"number-theory",description:"Generates the Pell sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { pell-take-while } = import("number-theory");\npell-take-while(-> $ < 1000)'],seeAlso:["number-theory.pell-seq","number-theory.pell-nth","number-theory.pell?"]},"pell-nth":{category:"number-theory",description:"Generates the nth term of the Pell sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { pell-nth } = import("number-theory");\npell-nth(5)','let { pell-nth } = import("number-theory");\npell-nth(10)','let { pell-nth } = import("number-theory");\npell-nth(20)'],seeAlso:["number-theory.pell-seq","number-theory.pell-take-while","number-theory.pell?"]},"pell?":{category:"number-theory",description:"Checks if a number is a Pell number.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { pell? } = import("number-theory");\npell?(1)','let { pell? } = import("number-theory");\npell?(470832)','let { pell? } = import("number-theory");\npell?(10)'],seeAlso:["number-theory.pell-seq","number-theory.pell-nth","number-theory.fibonacci?","number-theory.pell-take-while"]},"perfect-seq":{category:"number-theory",description:"Generates the perfect numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If no length is provided, it defaults to 7 (the maximum length of the pre-calculated perfect numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { perfect-seq } = import("number-theory");\nperfect-seq(1)','let { perfect-seq } = import("number-theory");\nperfect-seq(5)','let { perfect-seq } = import("number-theory");\nperfect-seq()'],seeAlso:["number-theory.perfect-nth","number-theory.perfect-take-while","number-theory.perfect?","number-theory.abundant-seq","number-theory.deficient-seq","number-theory.amicable?"]},"perfect-take-while":{category:"number-theory",description:"Generates the perfect numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { perfect-take-while } = import("number-theory");\nperfect-take-while(-> $ < 1000)'],seeAlso:["number-theory.perfect-seq","number-theory.perfect-nth","number-theory.perfect?"]},"perfect-nth":{category:"number-theory",description:"Generates the nth term of the perfect numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the perfect number to generate."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-nth } = import("number-theory");\nperfect-nth(1)','let { perfect-nth } = import("number-theory");\nperfect-nth(5)'],seeAlso:["number-theory.perfect-seq","number-theory.perfect-take-while","number-theory.perfect?"]},"perfect?":{category:"number-theory",description:"Checks if a number is in the perfect numbers.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { perfect? } = import("number-theory");\nperfect?(0)','let { perfect? } = import("number-theory");\nperfect?(1)','let { perfect? } = import("number-theory");\nperfect?(2)','let { perfect? } = import("number-theory");\nperfect?(3)','let { perfect? } = import("number-theory");\nperfect?(4)','let { perfect? } = import("number-theory");\nperfect?(5)','let { perfect? } = import("number-theory");\nperfect?(6)','let { perfect? } = import("number-theory");\nperfect?(7)','let { perfect? } = import("number-theory");\nperfect?(8)','let { perfect? } = import("number-theory");\nperfect?(9)'],seeAlso:["number-theory.perfect-seq","number-theory.perfect-nth","number-theory.abundant?","number-theory.deficient?","number-theory.sigma","number-theory.perfect-take-while","number-theory.amicable?","number-theory.proper-divisors"]},"perfect-square-seq":{category:"number-theory",description:"Generates the perfect square numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { perfect-square-seq } = import("number-theory");\nperfect-square-seq(5)','let { perfect-square-seq } = import("number-theory");\nperfect-square-seq(20)'],seeAlso:["number-theory.perfect-square-nth","number-theory.perfect-square-take-while","number-theory.perfect-square?","number-theory.perfect-cube-seq","number-theory.perfect-power-seq","number-theory.polygonal-seq"]},"perfect-square-take-while":{category:"number-theory",description:"Generates the perfect square numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { perfect-square-take-while } = import("number-theory");\nperfect-square-take-while(-> $ <= 100)'],seeAlso:["number-theory.perfect-square-seq","number-theory.perfect-square-nth","number-theory.perfect-square?"]},"perfect-square-nth":{category:"number-theory",description:"Generates the nth term of the perfect square numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-square-nth } = import("number-theory");\nperfect-square-nth(1)','let { perfect-square-nth } = import("number-theory");\nperfect-square-nth(5)'],seeAlso:["number-theory.perfect-square-seq","number-theory.perfect-square-take-while","number-theory.perfect-square?"]},"perfect-square?":{category:"number-theory",description:"Checks if a number is a perfect square.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-square? } = import("number-theory");\nperfect-square?(16)','let { perfect-square? } = import("number-theory");\nperfect-square?(20)'],seeAlso:["number-theory.perfect-square-seq","number-theory.perfect-square-nth","number-theory.perfect-cube?","number-theory.perfect-power?","number-theory.perfect-square-take-while","number-theory.perfect-power","number-theory.polygonal?"]},"perfect-cube-seq":{category:"number-theory",description:"Generates the perfect cube numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { perfect-cube-seq } = import("number-theory");\nperfect-cube-seq(5)','let { perfect-cube-seq } = import("number-theory");\nperfect-cube-seq(20)'],seeAlso:["number-theory.perfect-cube-nth","number-theory.perfect-cube-take-while","number-theory.perfect-cube?","number-theory.perfect-square-seq","number-theory.perfect-power-seq"]},"perfect-cube-take-while":{category:"number-theory",description:"Generates the perfect cube numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { perfect-cube-take-while } = import("number-theory");\nperfect-cube-take-while(-> $ <= 100)'],seeAlso:["number-theory.perfect-cube-seq","number-theory.perfect-cube-nth","number-theory.perfect-cube?"]},"perfect-cube-nth":{category:"number-theory",description:"Generates the nth term of the perfect cube numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-cube-nth } = import("number-theory");\nperfect-cube-nth(1)','let { perfect-cube-nth } = import("number-theory");\nperfect-cube-nth(5)'],seeAlso:["number-theory.perfect-cube-seq","number-theory.perfect-cube-take-while","number-theory.perfect-cube?"]},"perfect-cube?":{category:"number-theory",description:"Checks if a number is in the perfect cube numbers.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-cube? } = import("number-theory");\nperfect-cube?(7)','let { perfect-cube? } = import("number-theory");\nperfect-cube?(8)','let { perfect-cube? } = import("number-theory");\nperfect-cube?(9)'],seeAlso:["number-theory.perfect-cube-seq","number-theory.perfect-cube-nth","number-theory.perfect-square?","number-theory.perfect-power?","number-theory.perfect-cube-take-while","number-theory.perfect-power"]},"perfect-power-seq":{category:"number-theory",description:"Generates the perfect power numbers up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { perfect-power-seq } = import("number-theory");\nperfect-power-seq(5)','let { perfect-power-seq } = import("number-theory");\nperfect-power-seq(20)'],seeAlso:["number-theory.perfect-power-nth","number-theory.perfect-power-take-while","number-theory.perfect-power?","number-theory.perfect-power","number-theory.perfect-square-seq","number-theory.perfect-cube-seq"]},"perfect-power-take-while":{category:"number-theory",description:"Generates the perfect power numbers while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { perfect-power-take-while } = import("number-theory");\nperfect-power-take-while(-> $ <= 100)'],seeAlso:["number-theory.perfect-power-seq","number-theory.perfect-power-nth","number-theory.perfect-power?"]},"perfect-power-nth":{category:"number-theory",description:"Generates the nth term of the perfect power numbers.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-power-nth } = import("number-theory");\nperfect-power-nth(3)','let { perfect-power-nth } = import("number-theory");\nperfect-power-nth(15)'],seeAlso:["number-theory.perfect-power-seq","number-theory.perfect-power-take-while","number-theory.perfect-power?"]},"perfect-power?":{category:"number-theory",description:"Checks if a number is in the perfect power numbers.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-power? } = import("number-theory");\nperfect-power?(7)','let { perfect-power? } = import("number-theory");\nperfect-power?(8)','let { perfect-power? } = import("number-theory");\nperfect-power?(9)','let { perfect-power? } = import("number-theory");\nperfect-power?(10)'],seeAlso:["number-theory.perfect-power-seq","number-theory.perfect-power-nth","number-theory.perfect-power","number-theory.perfect-square?","number-theory.perfect-cube?","number-theory.perfect-power-take-while"]},"polygonal-seq":{category:"number-theory",description:"Generates the polygonal sequence for a given number of sides and length.",returns:{type:"integer",array:!0},args:{sides:{type:"integer",description:"The number of sides of the polygon."},length:{type:"integer",description:"The length of the sequence to generate."},a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["sides","length"]}],examples:['let { polygonal-seq } = import("number-theory");\npolygonal-seq(3, 2)','let { polygonal-seq } = import("number-theory");\npolygonal-seq(4, 2)','let { polygonal-seq } = import("number-theory");\npolygonal-seq(5, 3)','let { polygonal-seq } = import("number-theory");\npolygonal-seq(6, 5)','let { polygonal-seq } = import("number-theory");\npolygonal-seq(100, 10)'],seeAlso:["number-theory.polygonal-nth","number-theory.polygonal-take-while","number-theory.polygonal?","number-theory.perfect-square-seq"]},"polygonal-take-while":{category:"number-theory",description:"Generates the polygonal sequence while a condition is met.",returns:{type:"integer",array:!0},args:{sides:{type:"integer",description:"The number of sides of the polygon."},takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."},a:{type:"integer"},b:{type:"function"}},variants:[{argumentNames:["sides","takeWhile"]}],examples:['let { polygonal-take-while } = import("number-theory");\npolygonal-take-while(15, -> $ < 1000)'],seeAlso:["number-theory.polygonal-seq","number-theory.polygonal-nth","number-theory.polygonal?"]},"polygonal-nth":{category:"number-theory",description:"Generates the nth term of the polygonal sequence.",returns:{type:"integer"},args:{sides:{type:"integer",description:"The number of sides of the polygon."},n:{type:"integer",description:"The index of the term to generate."},a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["sides","n"]}],examples:['let { polygonal-nth } = import("number-theory");\npolygonal-nth(3, 9)','let { polygonal-nth } = import("number-theory");\npolygonal-nth(4, 5)','let { polygonal-nth } = import("number-theory");\npolygonal-nth(5, 5)'],seeAlso:["number-theory.polygonal-seq","number-theory.polygonal-take-while","number-theory.polygonal?"]},"polygonal?":{category:"number-theory",description:"Checks if a number is in the polygonal sequence.",returns:{type:"boolean"},args:{sides:{type:"integer",description:"The number of sides of the polygon."},n:{type:"integer",description:"The number to check."},a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["sides","n"]}],examples:['let { polygonal? } = import("number-theory");\npolygonal?(3, 10)','let { polygonal? } = import("number-theory");\npolygonal?(3, 9)','let { polygonal? } = import("number-theory");\npolygonal?(4, 10000)','let { polygonal? } = import("number-theory");\npolygonal?(4, 1000)','let { polygonal? } = import("number-theory");\npolygonal?(6, 45)'],seeAlso:["number-theory.polygonal-seq","number-theory.polygonal-nth","number-theory.perfect-square?","number-theory.polygonal-take-while"]},"prime-seq":{category:"number-theory",description:"Generates the prime sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { prime-seq } = import("number-theory");\nprime-seq(1)','let { prime-seq } = import("number-theory");\nprime-seq(2)','let { prime-seq } = import("number-theory");\nprime-seq(10)'],seeAlso:["number-theory.prime-nth","number-theory.prime-take-while","number-theory.prime?","number-theory.composite-seq","number-theory.mersenne-seq","number-theory.lucky-seq"]},"prime-take-while":{category:"number-theory",description:"Generates the prime sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { prime-take-while } = import("number-theory");\nprime-take-while(-> $ < 50)'],seeAlso:["number-theory.prime-seq","number-theory.prime-nth","number-theory.prime?"]},"prime-nth":{category:"number-theory",description:"Generates the nth term of the prime sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { prime-nth } = import("number-theory");\nprime-nth(1)','let { prime-nth } = import("number-theory");\nprime-nth(2)','let { prime-nth } = import("number-theory");\nprime-nth(10)'],seeAlso:["number-theory.prime-seq","number-theory.prime-take-while","number-theory.prime?"]},"prime?":{category:"number-theory",description:"Determines if a number is prime.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { prime? } = import("number-theory");\nprime?(1)','let { prime? } = import("number-theory");\nprime?(2)','let { prime? } = import("number-theory");\nprime?(3)','let { prime? } = import("number-theory");\nprime?(4)','let { prime? } = import("number-theory");\nprime?(997)','let { prime? } = import("number-theory");\nprime?(1001)'],seeAlso:["number-theory.prime-seq","number-theory.prime-nth","number-theory.composite?","number-theory.prime-factors","number-theory.mersenne?","number-theory.prime-take-while","number-theory.lucky?"]},"recaman-seq":{category:"number-theory",description:"Generates the Recaman sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { recaman-seq } = import("number-theory");\nrecaman-seq(5)','let { recaman-seq } = import("number-theory");\nrecaman-seq(10)','let { recaman-seq } = import("number-theory");\nrecaman-seq(20)'],seeAlso:["number-theory.recaman-nth","number-theory.recaman-take-while","number-theory.recaman?","number-theory.golomb-seq"]},"recaman-take-while":{category:"number-theory",description:"Generates the Recaman sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { recaman-take-while } = import("number-theory");\nrecaman-take-while(-> $ < 10)'],seeAlso:["number-theory.recaman-seq","number-theory.recaman-nth","number-theory.recaman?"]},"recaman-nth":{category:"number-theory",description:"Generates the nth term of the Recaman sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { recaman-nth } = import("number-theory");\nrecaman-nth(5)','let { recaman-nth } = import("number-theory");\nrecaman-nth(10)','let { recaman-nth } = import("number-theory");\nrecaman-nth(20)'],seeAlso:["number-theory.recaman-seq","number-theory.recaman-take-while","number-theory.recaman?"]},"recaman?":{category:"number-theory",description:"Checks if a number is in the Recaman sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { recaman? } = import("number-theory");\nrecaman?(5)','let { recaman? } = import("number-theory");\nrecaman?(10)','let { recaman? } = import("number-theory");\nrecaman?(20)'],seeAlso:["number-theory.recaman-seq","number-theory.recaman-nth","number-theory.recaman-take-while"]},"sylvester-seq":{category:"number-theory",description:"Generates the Sylvester sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate. If not provided, the default is 6 (the maximum length of the pre-calculated Sylvester numbers)."}},variants:[{argumentNames:["length"]},{argumentNames:[]}],examples:['let { sylvester-seq } = import("number-theory");\nsylvester-seq(5)','let { sylvester-seq } = import("number-theory");\nsylvester-seq()','let { sylvester-seq } = import("number-theory");\nsylvester-seq()'],seeAlso:["number-theory.sylvester-nth","number-theory.sylvester-take-while","number-theory.sylvester?"]},"sylvester-take-while":{category:"number-theory",description:"Generates the Sylvester sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { sylvester-take-while } = import("number-theory");\nsylvester-take-while(-> $ < 100000)'],seeAlso:["number-theory.sylvester-seq","number-theory.sylvester-nth","number-theory.sylvester?"]},"sylvester-nth":{category:"number-theory",description:"Generates the nth term of the Sylvester sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { sylvester-nth } = import("number-theory");\nsylvester-nth(1)','let { sylvester-nth } = import("number-theory");\nsylvester-nth(5)'],seeAlso:["number-theory.sylvester-seq","number-theory.sylvester-take-while","number-theory.sylvester?"]},"sylvester?":{category:"number-theory",description:"Checks if a number is in the Sylvester sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { sylvester? } = import("number-theory");\nsylvester?(2)','let { sylvester? } = import("number-theory");\nsylvester?(3)','let { sylvester? } = import("number-theory");\nsylvester?(6)'],seeAlso:["number-theory.sylvester-seq","number-theory.sylvester-nth","number-theory.sylvester-take-while"]},"thue-morse-seq":{category:"number-theory",description:"Generates the Thue-Morse sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { thue-morse-seq } = import("number-theory");\nthue-morse-seq(5)','let { thue-morse-seq } = import("number-theory");\nthue-morse-seq(10)','let { thue-morse-seq } = import("number-theory");\nthue-morse-seq(20)'],seeAlso:["number-theory.thue-morse-nth","number-theory.thue-morse-take-while","number-theory.thue-morse?"]},"thue-morse-take-while":{category:"number-theory",description:"Generates the Thue-Morse sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { thue-morse-take-while } = import("number-theory");\nthue-morse-take-while(-> $2 < 10)'],seeAlso:["number-theory.thue-morse-seq","number-theory.thue-morse-nth","number-theory.thue-morse?"]},"thue-morse-nth":{category:"number-theory",description:"Generates the nth term of the Thue-Morse sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term in the sequence."}},variants:[{argumentNames:["n"]}],examples:['let { thue-morse-nth } = import("number-theory");\nthue-morse-nth(5)','let { thue-morse-nth } = import("number-theory");\nthue-morse-nth(10)','let { thue-morse-nth } = import("number-theory");\nthue-morse-nth(20)'],seeAlso:["number-theory.thue-morse-seq","number-theory.thue-morse-take-while","number-theory.thue-morse?"]},"thue-morse?":{category:"number-theory",description:"Checks if a number is part of the Thue-Morse sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { thue-morse? } = import("number-theory");\nthue-morse?(1)','let { thue-morse? } = import("number-theory");\nthue-morse?(2)'],seeAlso:["number-theory.thue-morse-seq","number-theory.thue-morse-nth","number-theory.thue-morse-take-while"]},"tribonacci-seq":{category:"number-theory",description:"Generates the tribonacci sequence up to a specified length.",returns:{type:"integer",array:!0},args:{length:{type:"integer",description:"The length of the sequence to generate."}},variants:[{argumentNames:["length"]}],examples:['let { tribonacci-seq } = import("number-theory");\ntribonacci-seq(1)','let { tribonacci-seq } = import("number-theory");\ntribonacci-seq(2)','let { tribonacci-seq } = import("number-theory");\ntribonacci-seq(10)'],seeAlso:["number-theory.tribonacci-nth","number-theory.tribonacci-take-while","number-theory.tribonacci?","number-theory.fibonacci-seq"]},"tribonacci-take-while":{category:"number-theory",description:"Generates the tribonacci sequence while a condition is met.",returns:{type:"integer",array:!0},args:{takeWhile:{type:"function",description:"A function that takes an integer and an index and returns a boolean."}},variants:[{argumentNames:["takeWhile"]}],examples:['let { tribonacci-take-while } = import("number-theory");\ntribonacci-take-while(-> $ < 100)'],seeAlso:["number-theory.tribonacci-seq","number-theory.tribonacci-nth","number-theory.tribonacci?"]},"tribonacci-nth":{category:"number-theory",description:"Generates the nth term of the tribonacci sequence.",returns:{type:"integer"},args:{n:{type:"integer",description:"The index of the term to generate."}},variants:[{argumentNames:["n"]}],examples:['let { tribonacci-nth } = import("number-theory");\ntribonacci-nth(1)','let { tribonacci-nth } = import("number-theory");\ntribonacci-nth(2)','let { tribonacci-nth } = import("number-theory");\ntribonacci-nth(10)'],seeAlso:["number-theory.tribonacci-seq","number-theory.tribonacci-take-while","number-theory.tribonacci?"]},"tribonacci?":{category:"number-theory",description:"Determines if a number is in the tribonacci sequence.",returns:{type:"boolean"},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { tribonacci? } = import("number-theory");\ntribonacci?(0)','let { tribonacci? } = import("number-theory");\ntribonacci?(1)','let { tribonacci? } = import("number-theory");\ntribonacci?(2)','let { tribonacci? } = import("number-theory");\ntribonacci?(3)','let { tribonacci? } = import("number-theory");\ntribonacci?(4)','let { tribonacci? } = import("number-theory");\ntribonacci?(5)','let { tribonacci? } = import("number-theory");\ntribonacci?(6)','let { tribonacci? } = import("number-theory");\ntribonacci?(7)','let { tribonacci? } = import("number-theory");\ntribonacci?(8)','let { tribonacci? } = import("number-theory");\ntribonacci?(9)','let { tribonacci? } = import("number-theory");\ntribonacci?(10)'],seeAlso:["number-theory.tribonacci-seq","number-theory.tribonacci-nth","number-theory.fibonacci?","number-theory.tribonacci-take-while"]},"count-combinations":{category:"number-theory",description:"Calculates the number of combinations of n items taken k at a time.",returns:{type:"integer"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { count-combinations } = import("number-theory");\ncount-combinations(5, 3)','let { count-combinations } = import("number-theory");\ncount-combinations(10, 2)'],seeAlso:["number-theory.combinations","number-theory.count-permutations","number-theory.factorial","number-theory.multinomial","number-theory.stirling-second","number-theory.count-partitions","number-theory.count-power-set"]},combinations:{category:"number-theory",description:"Generates all possible combinations of a specified size from a collection.",returns:{type:"array",array:!0},args:{set:{type:"array",array:!0,description:"The input collection to generate combinations from."},n:{type:"integer",description:"The size of each combination."},a:{type:"array"},b:{type:"integer"}},variants:[{argumentNames:["set","n"]}],examples:['let { combinations } = import("number-theory");\ncombinations([1, 2, 3], 2)','let { combinations } = import("number-theory");\ncombinations(["a", "b", "c"], 2)','let { combinations } = import("number-theory");\ncombinations([1, 2, 3], 0)','let { combinations } = import("number-theory");\ncombinations([1, 2, 3], 1)','let { combinations } = import("number-theory");\ncombinations([1, 2, 3], 3)'],seeAlso:["number-theory.count-combinations","number-theory.permutations","number-theory.power-set","number-theory.cartesian-product","number-theory.partitions"]},"count-derangements":{category:"number-theory",description:"Calculates the number of derangements (permutations where no element appears in its original position) of n items.",returns:{type:"integer"},args:{n:{type:"integer",description:"The total number of items."}},variants:[{argumentNames:["n"]}],examples:['let { count-derangements } = import("number-theory");\ncount-derangements(4)','let { count-derangements } = import("number-theory");\ncount-derangements(5)'],seeAlso:["number-theory.derangements","number-theory.count-permutations","number-theory.factorial"]},derangements:{category:"number-theory",description:"Generates all derangements (permutations where no element appears in its original position) of a set.",returns:{type:"array",array:!0},args:{set:{type:"array",array:!0,description:"The input collection to generate derangements from."}},variants:[{argumentNames:["set"]}],examples:['let { derangements } = import("number-theory");\nderangements([1, 2, 3, 4])','let { derangements } = import("number-theory");\nderangements(["a", "b", "c"])'],seeAlso:["number-theory.count-derangements","number-theory.permutations"]},divisors:{category:"number-theory",description:"Returns the divisors of a number.",returns:{type:"integer",array:!0},args:{n:{type:"integer",description:"The number to find divisors for."}},variants:[{argumentNames:["n"]}],examples:['let { divisors } = import("number-theory");\ndivisors(12)','let { divisors } = import("number-theory");\ndivisors(100)','let { divisors } = import("number-theory");\ndivisors(37)'],seeAlso:["number-theory.count-divisors","number-theory.proper-divisors","number-theory.sigma","number-theory.prime-factors","number-theory.divisible-by?","number-theory.lcm","number-theory.abundant?","number-theory.deficient?","number-theory.count-proper-divisors"]},"count-divisors":{category:"number-theory",description:"Returns the number of divisors of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to count divisors for."}},variants:[{argumentNames:["n"]}],examples:['let { count-divisors } = import("number-theory");\ncount-divisors(12)','let { count-divisors } = import("number-theory");\ncount-divisors(100)','let { count-divisors } = import("number-theory");\ncount-divisors(37)'],seeAlso:["number-theory.divisors","number-theory.count-proper-divisors","number-theory.sigma"]},"proper-divisors":{category:"number-theory",description:"Returns the proper divisors of a number.",returns:{type:"integer",array:!0},args:{n:{type:"integer",description:"The number to find proper divisors for."}},variants:[{argumentNames:["n"]}],examples:['let { proper-divisors } = import("number-theory");\nproper-divisors(12)','let { proper-divisors } = import("number-theory");\nproper-divisors(100)','let { proper-divisors } = import("number-theory");\nproper-divisors(37)'],seeAlso:["number-theory.count-proper-divisors","number-theory.divisors","number-theory.amicable?","number-theory.perfect?"]},"count-proper-divisors":{category:"number-theory",description:"Returns the number of proper divisors of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to count proper divisors for."}},variants:[{argumentNames:["n"]}],examples:['let { count-proper-divisors } = import("number-theory");\ncount-proper-divisors(12)','let { count-proper-divisors } = import("number-theory");\ncount-proper-divisors(100)','let { count-proper-divisors } = import("number-theory");\ncount-proper-divisors(37)'],seeAlso:["number-theory.proper-divisors","number-theory.count-divisors","number-theory.divisors"]},factorial:{category:"number-theory",description:"Calculates the factorial of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the factorial for."}},variants:[{argumentNames:["n"]}],examples:['let { factorial } = import("number-theory");\nfactorial(5)','let { factorial } = import("number-theory");\nfactorial(0)','let { factorial } = import("number-theory");\nfactorial(10)','let { factorial } = import("number-theory");\nfactorial(20)'],seeAlso:["number-theory.factorial-seq","number-theory.factorial-nth","number-theory.factorial?","number-theory.count-combinations","number-theory.count-permutations","number-theory.multinomial","number-theory.count-derangements"]},partitions:{category:"number-theory",description:"Generates all partitions of a number.",returns:{type:"array",array:!0},args:{n:{type:"integer",description:"The number to partition."}},variants:[{argumentNames:["n"]}],examples:['let { partitions } = import("number-theory");\npartitions(4)','let { partitions } = import("number-theory");\npartitions(8)'],seeAlso:["number-theory.count-partitions","number-theory.partition-seq","number-theory.combinations","number-theory.partition?"]},"count-partitions":{category:"number-theory",description:"Returns the number of partitions of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to count partitions for."}},variants:[{argumentNames:["n"]}],examples:['let { count-partitions } = import("number-theory");\ncount-partitions(4)','let { count-partitions } = import("number-theory");\ncount-partitions(8)','let { count-partitions } = import("number-theory");\ncount-partitions(15)'],seeAlso:["number-theory.partitions","number-theory.partition-seq","number-theory.count-combinations"]},permutations:{category:"number-theory",description:"Generates all permutations of a collection.",returns:{type:"array",array:!0},args:{set:{type:"array",array:!0,description:"The input collection to generate permutations from."}},variants:[{argumentNames:["set"]}],examples:['let { permutations } = import("number-theory");\npermutations([1, 2, 3])','let { permutations } = import("number-theory");\npermutations(["a", "b", "c"])','let { permutations } = import("number-theory");\npermutations([1, 2, 3, 4])','let { permutations } = import("number-theory");\npermutations([1, 2])','let { permutations } = import("number-theory");\npermutations([1])','let { permutations } = import("number-theory");\npermutations([])'],seeAlso:["number-theory.count-permutations","number-theory.combinations","number-theory.derangements","number-theory.cartesian-product"]},"count-permutations":{category:"number-theory",description:"Returns the number of permutations of n items taken k at a time.",returns:{type:"integer"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { count-permutations } = import("number-theory");\ncount-permutations(5, 3)','let { count-permutations } = import("number-theory");\ncount-permutations(10, 2)','let { count-permutations } = import("number-theory");\ncount-permutations(10, 10)','let { count-permutations } = import("number-theory");\ncount-permutations(10, 0)','let { count-permutations } = import("number-theory");\ncount-permutations(10, 1)'],seeAlso:["number-theory.permutations","number-theory.count-combinations","number-theory.factorial","number-theory.multinomial","number-theory.stirling-first","number-theory.count-derangements"]},"power-set":{category:"number-theory",description:"Generates the power set of a collection.",returns:{type:"array",array:!0},args:{set:{type:"any",array:!0,description:"The input collection to generate the power set from."}},variants:[{argumentNames:["set"]}],examples:['let { power-set } = import("number-theory");\npower-set(["a", "b", "c"])','let { power-set } = import("number-theory");\npower-set([1, 2])','let { power-set } = import("number-theory");\npower-set([1])','let { power-set } = import("number-theory");\npower-set([])'],seeAlso:["number-theory.count-power-set","number-theory.combinations","number-theory.cartesian-product"]},"count-power-set":{category:"number-theory",description:"Returns the number of subsets of a set.",returns:{type:"integer"},args:{n:{type:"integer",description:"The size of the set."}},variants:[{argumentNames:["n"]}],examples:['let { count-power-set } = import("number-theory");\ncount-power-set(3)','let { count-power-set } = import("number-theory");\ncount-power-set(5)','let { count-power-set } = import("number-theory");\ncount-power-set(10)'],seeAlso:["number-theory.power-set","number-theory.count-combinations"]},"prime-factors":{category:"number-theory",description:"Returns the prime factors of a number.",returns:{type:"integer",array:!0},args:{n:{type:"integer",description:"The number to factor."}},variants:[{argumentNames:["n"]}],examples:['let { prime-factors } = import("number-theory");\nprime-factors(12)','let { prime-factors } = import("number-theory");\nprime-factors(100)','let { prime-factors } = import("number-theory");\nprime-factors(37)'],seeAlso:["number-theory.count-prime-factors","number-theory.distinct-prime-factors","number-theory.prime?","number-theory.divisors","number-theory.euler-totient","number-theory.mobius","number-theory.composite?","number-theory.count-distinct-prime-factors"]},"count-prime-factors":{category:"number-theory",description:"Returns the number of prime factors of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to count prime factors for."}},variants:[{argumentNames:["n"]}],examples:['let { count-prime-factors } = import("number-theory");\ncount-prime-factors(12)','let { count-prime-factors } = import("number-theory");\ncount-prime-factors(100)','let { count-prime-factors } = import("number-theory");\ncount-prime-factors(37)'],seeAlso:["number-theory.prime-factors","number-theory.distinct-prime-factors","number-theory.count-distinct-prime-factors"]},"distinct-prime-factors":{category:"number-theory",description:"Returns the distinct prime factors of a number.",returns:{type:"integer",array:!0},args:{n:{type:"integer",description:"The number to find distinct prime factors for."}},variants:[{argumentNames:["n"]}],examples:['let { distinct-prime-factors } = import("number-theory");\ndistinct-prime-factors(12)','let { distinct-prime-factors } = import("number-theory");\ndistinct-prime-factors(100)','let { distinct-prime-factors } = import("number-theory");\ndistinct-prime-factors(37)'],seeAlso:["number-theory.prime-factors","number-theory.count-distinct-prime-factors","number-theory.count-prime-factors"]},"count-distinct-prime-factors":{category:"number-theory",description:"Returns the number of distinct prime factors of a number.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to count distinct prime factors for."}},variants:[{argumentNames:["n"]}],examples:['let { count-distinct-prime-factors } = import("number-theory");\ncount-distinct-prime-factors(12)','let { count-distinct-prime-factors } = import("number-theory");\ncount-distinct-prime-factors(100)','let { count-distinct-prime-factors } = import("number-theory");\ncount-distinct-prime-factors(37)'],seeAlso:["number-theory.distinct-prime-factors","number-theory.prime-factors","number-theory.count-prime-factors"]},"coprime?":{category:"number-theory",description:"Checks if two numbers are coprime (i.e., their GCD is 1).",returns:{type:"boolean"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { coprime? } = import("number-theory");\ncoprime?(12, 8)','let { coprime? } = import("number-theory");\ncoprime?(12, 5)','let { coprime? } = import("number-theory");\ncoprime?(37, 1)','let { coprime? } = import("number-theory");\ncoprime?(0, 0)','let { coprime? } = import("number-theory");\ncoprime?(0, 5)','let { coprime? } = import("number-theory");\ncoprime?(5, 0)','let { coprime? } = import("number-theory");\ncoprime?(1, 0)','let { coprime? } = import("number-theory");\ncoprime?(0, 1)','let { coprime? } = import("number-theory");\ncoprime?(1, 1)','let { coprime? } = import("number-theory");\ncoprime?(2, 3)'],seeAlso:["number-theory.gcd","number-theory.euler-totient","number-theory.divisible-by?","number-theory.lcm","number-theory.carmichael-lambda"]},"divisible-by?":{category:"number-theory",description:"Checks if a number is divisible by another number.",returns:{type:"boolean"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { divisible-by? } = import("number-theory");\ndivisible-by?(12, 4)','let { divisible-by? } = import("number-theory");\ndivisible-by?(12, 5)','let { divisible-by? } = import("number-theory");\ndivisible-by?(37, 1)','let { divisible-by? } = import("number-theory");\ndivisible-by?(0, 0)','let { divisible-by? } = import("number-theory");\ndivisible-by?(0, 5)','let { divisible-by? } = import("number-theory");\ndivisible-by?(5, 0)'],seeAlso:["number-theory.divisors","number-theory.gcd","number-theory.coprime?"]},gcd:{category:"number-theory",description:"Calculates the greatest common divisor (GCD) of two numbers.",returns:{type:"integer"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { gcd } = import("number-theory");\ngcd(100, 25)','let { gcd } = import("number-theory");\ngcd(37, 1)','let { gcd } = import("number-theory");\ngcd(0, 0)','let { gcd } = import("number-theory");\ngcd(0, 5)','let { gcd } = import("number-theory");\ngcd(5, 0)'],seeAlso:["number-theory.lcm","number-theory.extended-gcd","number-theory.coprime?","number-theory.divisible-by?"]},lcm:{category:"number-theory",description:"Calculates the least common multiple (LCM) of two numbers.",returns:{type:"integer"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { lcm } = import("number-theory");\nlcm(100, 25)','let { lcm } = import("number-theory");\nlcm(37, 1)','let { lcm } = import("number-theory");\nlcm(0, 5)','let { lcm } = import("number-theory");\nlcm(5, 0)'],seeAlso:["number-theory.gcd","number-theory.divisors","number-theory.coprime?"]},multinomial:{category:"number-theory",description:"Calculates the multinomial coefficient from of a list of numbers representing the sizes of each group.",returns:{type:"integer"},args:{args:{type:"integer",rest:!0,description:"The numbers representing the sizes of each group."}},variants:[{argumentNames:["args"]}],examples:['let { multinomial } = import("number-theory");\nmultinomial(5, 2, 3)','let { multinomial } = import("number-theory");\nmultinomial(10, 2, 3, 5)'],seeAlso:["number-theory.count-combinations","number-theory.factorial","number-theory.count-permutations"],hideOperatorForm:!0},"amicable?":{category:"number-theory",description:"Checks if two numbers are amicable (i.e., the sum of the proper divisors of each number equals the other number).",returns:{type:"boolean"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { amicable? } = import("number-theory");\namicable?(220, 284)','let { amicable? } = import("number-theory");\namicable?(1184, 1210)','let { amicable? } = import("number-theory");\namicable?(2620, 2924)','let { amicable? } = import("number-theory");\namicable?(5020, 5564)','let { amicable? } = import("number-theory");\namicable?(6232, 6368)'],seeAlso:["number-theory.proper-divisors","number-theory.perfect?","number-theory.sigma","number-theory.perfect-seq"]},"euler-totient":{category:"number-theory",description:"Calculates the Euler's totient function (φ(n)) of a number, which counts the integers up to n that are coprime to n.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the totient for."}},variants:[{argumentNames:["n"]}],examples:['let { euler-totient } = import("number-theory");\neuler-totient(1)','let { euler-totient } = import("number-theory");\neuler-totient(2)','let { euler-totient } = import("number-theory");\neuler-totient(10)','let { euler-totient } = import("number-theory");\neuler-totient(20)'],seeAlso:["number-theory.coprime?","number-theory.carmichael-lambda","number-theory.mobius","number-theory.prime-factors","number-theory.mertens"]},mobius:{category:"number-theory",description:"Calculates the Möbius function (μ(n)) of a number, which is used in number theory.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the Möbius function for."}},variants:[{argumentNames:["n"]}],examples:['let { mobius } = import("number-theory");\nmobius(1)','let { mobius } = import("number-theory");\nmobius(2)','let { mobius } = import("number-theory");\nmobius(3)','let { mobius } = import("number-theory");\nmobius(4)','let { mobius } = import("number-theory");\nmobius(6)','let { mobius } = import("number-theory");\nmobius(12)','let { mobius } = import("number-theory");\nmobius(30)'],seeAlso:["number-theory.mertens","number-theory.euler-totient","number-theory.prime-factors"]},mertens:{category:"number-theory",description:"Calculates the Mertens function (M(n)) of a number, which is the sum of the Möbius function up to n.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the Mertens function for."}},variants:[{argumentNames:["n"]}],examples:['let { mobius } = import("number-theory");\nmobius(1)','let { mobius } = import("number-theory");\nmobius(2)','let { mobius } = import("number-theory");\nmobius(3)','let { mobius } = import("number-theory");\nmobius(4)','let { mobius } = import("number-theory");\nmobius(6)','let { mobius } = import("number-theory");\nmobius(12)','let { mobius } = import("number-theory");\nmobius(30)'],seeAlso:["number-theory.mobius","number-theory.euler-totient"]},sigma:{category:"number-theory",description:"Calculates the sum of divisors function (σ(n)) of a number, which is the sum of all positive divisors of n.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the sum of divisors for."}},variants:[{argumentNames:["n"]}],examples:['let { sigma } = import("number-theory");\nsigma(1)','let { sigma } = import("number-theory");\nsigma(2)','let { sigma } = import("number-theory");\nsigma(3)','let { sigma } = import("number-theory");\nsigma(4)','let { sigma } = import("number-theory");\nsigma(6)','let { sigma } = import("number-theory");\nsigma(12)','let { sigma } = import("number-theory");\nsigma(30)'],seeAlso:["number-theory.divisors","number-theory.perfect?","number-theory.abundant?","number-theory.deficient?","number-theory.amicable?","number-theory.count-divisors"]},"carmichael-lambda":{category:"number-theory",description:"Calculates the Carmichael function (λ(n)) of a number, which is the smallest positive integer m such that a^m ≡ 1 (mod n) for all integers a coprime to n.",returns:{type:"integer"},args:{n:{type:"integer",description:"The number to calculate the Carmichael function for."}},variants:[{argumentNames:["n"]}],examples:['let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(1)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(2)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(3)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(4)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(6)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(12)','let { carmichael-lambda } = import("number-theory");\ncarmichael-lambda(30)'],seeAlso:["number-theory.euler-totient","number-theory.mod-exp","number-theory.coprime?"]},"cartesian-product":{category:"number-theory",description:"Calculates the Cartesian product of two or more sets.",returns:{type:"array",array:!0},args:{sets:{type:"array",array:!0,description:"The input collections to calculate the Cartesian product from."},a:{type:"array"},b:{type:"array"}},variants:[{argumentNames:["sets"]}],examples:['let { cartesian-product } = import("number-theory");\ncartesian-product([1, 2], ["a", "b"])','let { cartesian-product } = import("number-theory");\ncartesian-product([1, 2], ["a", "b"], [true, false])','let { cartesian-product } = import("number-theory");\ncartesian-product([1, 2, 3], ["x", "y", "z"])'],seeAlso:["number-theory.combinations","number-theory.power-set","number-theory.permutations"]},"perfect-power":{category:"number-theory",description:"Returns a tuple of the base and exponent if the number is a perfect power, otherwise returns null.",returns:{type:"array",array:!0},args:{n:{type:"integer",description:"The number to check."}},variants:[{argumentNames:["n"]}],examples:['let { perfect-power } = import("number-theory");\nperfect-power(1)','let { perfect-power } = import("number-theory");\nperfect-power(2)','let { perfect-power } = import("number-theory");\nperfect-power(4)','let { perfect-power } = import("number-theory");\nperfect-power(8)','let { perfect-power } = import("number-theory");\nperfect-power(9)','let { perfect-power } = import("number-theory");\nperfect-power(16)','let { perfect-power } = import("number-theory");\nperfect-power(19)'],seeAlso:["number-theory.perfect-power?","number-theory.perfect-power-seq","number-theory.perfect-square?","number-theory.perfect-cube?"]},"mod-exp":{category:"number-theory",description:"Calculates the modular exponentiation of a base raised to an exponent modulo a modulus.",returns:{type:"integer"},args:{base:{type:"integer"},exponent:{type:"integer"},modulus:{type:"integer"}},variants:[{argumentNames:["base","exponent","modulus"]}],examples:['let { mod-exp } = import("number-theory");\nmod-exp(2, 3, 5)','let { mod-exp } = import("number-theory");\nmod-exp(3, 4, 7)','let { mod-exp } = import("number-theory");\nmod-exp(5, 6, 11)','let { mod-exp } = import("number-theory");\nmod-exp(7, 8, 13)'],seeAlso:["number-theory.mod-inv","number-theory.carmichael-lambda","number-theory.chinese-remainder"]},"mod-inv":{category:"number-theory",description:"Calculates the modular multiplicative inverse of a number modulo another number.",returns:{type:"integer"},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","m"]}],examples:['let { mod-inv } = import("number-theory");\nmod-inv(3, 11)','let { mod-inv } = import("number-theory");\nmod-inv(10, 17)','let { mod-inv } = import("number-theory");\nmod-inv(5, 13)','let { mod-inv } = import("number-theory");\nmod-inv(7, 19)'],seeAlso:["number-theory.mod-exp","number-theory.extended-gcd","number-theory.chinese-remainder"]},"extended-gcd":{category:"number-theory",description:"Calculates the extended greatest common divisor (GCD) of two numbers, returning the GCD and the coefficients of Bézout's identity.",returns:{type:"integer",array:!0},args:{a:{type:"integer"},b:{type:"integer"}},variants:[{argumentNames:["a","b"]}],examples:['let { extended-gcd } = import("number-theory");\nextended-gcd(30, 12)','let { extended-gcd } = import("number-theory");\nextended-gcd(56, 98)','let { extended-gcd } = import("number-theory");\nextended-gcd(101, 10)','let { extended-gcd } = import("number-theory");\nextended-gcd(17, 13)'],seeAlso:["number-theory.gcd","number-theory.mod-inv","number-theory.chinese-remainder"]},"chinese-remainder":{category:"number-theory",description:"Solves a system of simultaneous congruences using the Chinese Remainder Theorem.",returns:{type:"integer"},args:{remainders:{type:"integer",array:!0,description:"The remainders of the congruences."},moduli:{type:"integer",array:!0,description:"The moduli of the congruences."},a:{type:"array"},b:{type:"array"}},variants:[{argumentNames:["remainders","moduli"]}],examples:['let { chinese-remainder } = import("number-theory");\nchinese-remainder([2, 3], [3, 5])','let { chinese-remainder } = import("number-theory");\nchinese-remainder([1, 2], [3, 4])','let { chinese-remainder } = import("number-theory");\nchinese-remainder([0, 1], [2, 3])','let { chinese-remainder } = import("number-theory");\nchinese-remainder([1, 2, 3], [4, 5, 7])'],seeAlso:["number-theory.mod-exp","number-theory.mod-inv","number-theory.extended-gcd"]},"stirling-first":{category:"number-theory",description:"Calculates the Stirling numbers of the first kind, which count the number of permutations of n elements with k cycles.",returns:{type:"integer"},args:{a:{type:"integer",description:"The number of elements."},b:{type:"integer",description:"The number of cycles."}},variants:[{argumentNames:["a","b"]}],examples:['let { stirling-first } = import("number-theory");\nstirling-first(5, 2)','let { stirling-first } = import("number-theory");\nstirling-first(4, 3)','let { stirling-first } = import("number-theory");\nstirling-first(6, 1)','let { stirling-first } = import("number-theory");\nstirling-first(7, 4)','let { stirling-first } = import("number-theory");\nstirling-first(8, 5)'],seeAlso:["number-theory.stirling-second","number-theory.bell-seq","number-theory.count-permutations"]},"stirling-second":{category:"number-theory",description:"Calculates the Stirling numbers of the second kind, which count the number of ways to partition n elements into k non-empty subsets.",returns:{type:"integer"},args:{a:{type:"integer",description:"The number of elements."},b:{type:"integer",description:"The number of subsets."}},variants:[{argumentNames:["a","b"]}],examples:['let { stirling-second } = import("number-theory");\nstirling-second(5, 2)','let { stirling-second } = import("number-theory");\nstirling-second(4, 3)','let { stirling-second } = import("number-theory");\nstirling-second(6, 1)','let { stirling-second } = import("number-theory");\nstirling-second(7, 4)','let { stirling-second } = import("number-theory");\nstirling-second(8, 5)'],seeAlso:["number-theory.stirling-first","number-theory.bell-seq","number-theory.count-combinations"]}};function N(e,t){if(0===t||t===e)return 1;let r=1;for(let n=0;n<t;n++)r*=(e-n)/(n+1);return r}function T(e,t){if(1===t)return e.map(e=>[e]);const r=[];for(let n=0;n<=e.length-t;n++){const o=e[n],i=T(e.slice(n+1),t-1);for(const e of i)r.push([o,...e])}return r}const G={combinations:{evaluate:([e,t],r)=>(d(e,r),l(t,r,{integer:!0,nonNegative:!0,lte:e.length}),0===t?[[]]:T(e,t)),arity:x(2)},"count-combinations":{evaluate:([e,t],r)=>(l(e,r,{integer:!0,nonNegative:!0}),l(t,r,{integer:!0,nonNegative:!0,lte:e}),N(e,t)),arity:x(2)}};const $={derangements:{evaluate:([e],t)=>(d(e,t),function(e){const t=e.length,r=[],n=Array.from({length:t},()=>!1),o=Array.from({length:t});return function i(a){if(a!==t)for(let r=0;r<t;r++)n[r]||r===a||(n[r]=!0,o[a]=e[r],i(a+1),n[r]=!1);else r.push([...o])}(0),r}(e)),arity:x(1)},"count-derangements":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),function(e){if(1===e)return 0;let t=1,r=0,n=0;for(let o=2;o<=e;o++)n=(o-1)*(t+r),t=r,r=n;return n}(e)),arity:x(1)}};function C(e){const t=[];for(let r=1;r<=Math.sqrt(e);r++)e%r===0&&(t.push(r),r!==e/r&&t.push(e/r));return t}function W(e){return C(e).sort((e,t)=>e-t)}function M(e){return W(e).slice(0,-1)}const S={divisors:{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),W(e)),arity:x(1)},"count-divisors":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),C(e).length),arity:x(1)},"proper-divisors":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),M(e)),arity:x(1)},"count-proper-divisors":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),C(e).length-1),arity:x(1)}},E=[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,20922789888e3,355687428096e3,6402373705728e3];function R(e){if(e<0)throw new Error("Factorial is not defined for negative numbers");if(0===e||1===e)return 1;if(e<=18)return E[e];let t=E[18];for(let r=19;r<=e;r++)t*=r;return t}const I={factorial:{evaluate:([e],t)=>(l(e,t,{integer:!0,nonNegative:!0,lte:170}),R(e)),arity:x(1)}},z=[1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,231,297,385,490,627,792,1002,1255,1575,1958,2436,3010,3718,4565,5604,6842,8349,10143,12310,14883,17977,21637,26015,31185,37338,44583,53174,63261,75175,89134,105558,124754,147273,173525,204226,239943,281589,329931,386155,451276,526823,614154,715220,831820,966467,1121505,1300156,1505499,1741630,2012558,2323520,2679689,3087735,3554345,4087968,4697205,5392783,6185689,7089500,8118264,9289091,10619863,12132164,13848650,15796476,18004327,20506255,23338469,26543660,30167357,34262962,38887673,44108109,49995925,56634173,64112359,72533807,82010177,92669720,104651419,118114304,133230930,150198136,169229875,190569292,214481126,241265379,271248950,304801365,342325709,384276336,431149389,483502844,541946240,607163746,679903203,761002156,851376628,952050665,1064144451,1188908248,1327710076,1482074143,1653668665,1844349560,2056148051,2291320912,2552338241,2841940500,3163127352,3519222692,3913864295,4351078600,4835271870,5371315400,5964539504,6620830889,7346629512,8149040695,9035836076,10015581680,11097645016,12292341831,13610949895,15065878135,16670689208,18440293320,20390982757,22540654445,24908858009,27517052599,30388671978,33549419497,37027355200,40853235313,45060624582,49686288421,54770336324,60356673280,66493182097,73232243759,80630964769,88751778802,97662728555,107438159466,118159068427,129913904637,142798995930,156919475295,172389800255,189334822579,207890420102,228204732751,250438925115,274768617130,301384802048,330495499613,362326859895,397125074750,435157697830,476715857290,522115831195,571701605655,625846753120,684957390936,749474411781,819876908323,896684817527,980462880430,0xf98dace281,1171432692373,1280011042268,1398341745571,1527273599625,1667727404093,1820701100652,1987276856363,2168627105469,2366022741845,2580840212973,2814570987591,3068829878530,3345365983698,3646072432125,3972999029388,4328363658647,4714566886083,5134205287973,5590088317495,6085253859260,6622987708040,7206841706490,7840656226137,8528581302375,9275102575355,0x92c1cc50847,0x9f8afdf968b,0xad6918d4f36,0xbc72dde1287,0xccc0de0d1d7,0xde6da02b061,0xf195c5ba10a,18028182516671,19573856161145,21248279009367,23061871173849,25025873760111,27152408925615,29454549941750,31946390696157,34643126322519,37561133582570,40718063627362,44132934884255,47826239745920,51820051838712,56138148670947,60806135438329,65851585970275,71304185514919,77195892663512,83561103925871,90436839668817,97862933703585,0x604ca1b434ad,0x682ca0bc6d4e,0x70ad06a4328b,0x79da3e8e4df8,0x83c1a359c63d,0x8e7190d8114a,0x99f976fff202,0xa669edb53a4a,0xb3d4caca1bc8,0xc24d38b78151,0xd1e7cfd30909,0xe2bab064772f,0xf4dd9f8523e3,290726957916112,313891991306665,338854264248680,365749566870782,394723676655357,425933084409356,459545750448675,495741934760846,534715062908609,576672674947168,621837416509615,670448123060170,722760953690372,779050629562167,839611730366814,904760108316360,974834369944625,0x3bb262854d36d,0x404dafd2efa2e,0x4541ae2536f6d,0x4a94ddd83ba57,0x504e363fd1eca,0x56752ddfc97e7,0x5d11c356f6b53,0x642c86bff69f5,0x6bcea3db036a0,0x7401ecbfdbd63,0x7cd0e571c49d4,0x8646d010a1b6f,0x906fba0855202,0x9b5889f52508f,0xa70f0ea631153,0xb3a20ef033ec5,0xc1215ac210755,0xcf9ddd28cfa8d,0xdf29afbd9f60e,0xefd82f26a7157,4534253126900886,4872038056472084,5234371069753672,5622992691950605,6039763882095515,6486674127079088,6965850144195831,7479565078510584,8030248384943040,8620496275465025];const j={partitions:{evaluate:([e],t)=>(l(e,t,{integer:!0,nonNegative:!0}),function(e){if(e<=0)return[[]];if(1===e)return[[1]];const t=[];return function e(r,n,o){if(0!==r)for(let t=Math.min(n,r);t>=1;t--)o.push(t),e(r-t,t,o),o.pop();else t.push([...o])}(e,e,[]),t}(e)),arity:x(1)},"count-partitions":{evaluate:([e],r)=>{if(l(e,r,{integer:!0,nonNegative:!0}),0===e)return 1;if(e>z.length)throw new t(`n is too large. The maximum value is ${z.length-1}.`,r);return z[e-1]},arity:x(1)}};function D(e){if(0===e.length)return[[]];const t=[];for(let r=0;r<e.length;r++){const n=e[r],o=D([...e.slice(0,r),...e.slice(r+1)]);for(const e of o)t.push([n,...e])}return t}const P={permutations:{evaluate:([e],t)=>(d(e,t),D(e)),arity:x(1)},"count-permutations":{evaluate:([e,t],r)=>(l(e,r,{integer:!0,nonNegative:!0}),l(t,r,{integer:!0,nonNegative:!0,lte:e}),R(e)/R(e-t)),arity:x(2)}};const F={"power-set":{evaluate:([e],t)=>(d(e,t),function(e){const t=[[]];for(const r of e){const e=t.map(e=>[...e,r]);t.push(...e)}return t}(e)),arity:x(1)},"count-power-set":{evaluate:([e],t)=>(l(e,t,{integer:!0,nonNegative:!0}),e>=53?1/0:2**e),arity:x(1)}};function B(e){if(1===e)return[];const t=[];let r=2;for(;e>1;)e%r===0?(t.push(r),e/=r):r++;return t}const L={"prime-factors":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),B(e)),arity:x(1)},"distinct-prime-factors":{evaluate:([e],t)=>{l(e,t,{finite:!0,integer:!0,positive:!0});const r=B(e),n=new Set(r);return Array.from(n)},arity:x(1)},"count-prime-factors":{evaluate:([e],t)=>(l(e,t,{finite:!0,integer:!0,positive:!0}),B(e).length),arity:x(1)},"count-distinct-prime-factors":{evaluate:([e],t)=>{l(e,t,{finite:!0,integer:!0,positive:!0});const r=B(e);return new Set(r).size},arity:x(1)}};function O(e){return M(e).reduce((e,t)=>e+t,0)>e}const _={"abundant-seq":e=>{const t=[];let r=2;for(;t.length<e;)O(r)&&t.push(r),r+=1;return t},"abundant?":e=>O(e),"abundant-take-while":e=>{const t=[];for(let r=2;;r+=1)if(O(r)){if(!e(r,t.length))break;t.push(r)}return t}};function J(e,t,r=1e-10){if(e===t)return!0;const n=Math.abs(e-t);if(0===e||0===t||n<r)return n<r;return n/(Math.abs(e)+Math.abs(t))<r}const X={"arithmetic-seq":{evaluate:([e,t,r],n)=>(l(e,n,{finite:!0}),l(t,n,{finite:!0}),l(r,n,{integer:!0,positive:!0}),Array.from({length:r},(r,n)=>e+n*t)),arity:x(3)},"arithmetic-take-while":{evaluate:([e,t,r],n,o,{executeFunction:i})=>{l(e,n,{finite:!0}),l(t,n,{finite:!0}),w(r,n);const a=[];for(let s=0;;s+=1){const m=e+s*t;if(!i(r,[m,s],o,n))break;a[s]=m}return a},arity:x(3)},"arithmetic-nth":{evaluate:([e,t,r],n)=>(l(e,n,{finite:!0}),l(t,n,{finite:!0}),l(r,n,{integer:!0,positive:!0}),e+(r-1)*t),arity:x(3)},"arithmetic?":{evaluate:([e,t,r],n)=>(l(r,n),l(e,n,{finite:!0}),l(t,n,{finite:!0}),function(e,t,r){if(0===t)return J(r,e);const n=(r-e)/t;if(n<0)return!1;const o=Math.round(n),i=e+t*o;return J(n,o)&&J(i,r)}(e,t,r)),arity:x(3)}};function U(e){const t=[1];for(let r=1;r<e;r+=1){let e=0;for(let n=0;n<r;n+=1)e+=N(r+1,n)*t[n];t[r]=r>1&&r%2==1?0:-e/(r+1)}return t}const Z={"bernoulli-seq":{evaluate:([e],t)=>(l(e,t,{integer:!0,positive:!0}),U(e)),arity:x(1)},"bernoulli-nth":{evaluate:([e],t)=>{l(e,t,{integer:!0,positive:!0});return U(e)[e-1]},arity:x(1)},"bernoulli-take-while":{evaluate:([e],t,r,{executeFunction:n})=>{w(e,t);return function(e){const t=[1];let r=1;for(;;){const n=t.length+100;for(;r<n;r++){let n=0;for(let e=0;e<r;e++)n+=N(r+1,e)*t[e];const o=r>1&&r%2==1?0:-n/(r+1);if(!e(o,r))return t;t.push(o)}}}((t,o)=>!!n(e,[t,o],r))},arity:x(1)}};function H(e){if(e<=1)return!1;if(e<=3)return!0;if(e%2==0||e%3==0)return!1;for(let t=5;t*t<=e;t+=6)if(e%t===0||e%(t+2)===0)return!1;return!0}const K={"prime-seq":e=>{const t=[];let r=2;for(;t.length<e;)H(r)&&t.push(r),r+=1;return t},"prime?":e=>H(e),"prime-take-while":e=>{const t=[];for(let r=2;;r+=1)if(H(r)){if(!e(r,t.length))break;t.push(r)}return t}};function Q(e){return!(e<=1)&&!H(e)}const V={"composite-seq":e=>{const t=[];let r=2;for(;t.length<e;)Q(r)&&t.push(r),r+=1;return t},"composite?":e=>Q(e),"composite-take-while":e=>{const t=[];for(let r=4;;r+=1)if(Q(r)){if(!e(r,t.length))break;t.push(r)}return t}};function Y(e){return M(e).reduce((e,t)=>e+t,0)<e}const ee={"deficient-seq":e=>{const t=[];let r=1;for(;t.length<e;)Y(r)&&t.push(r),r+=1;return t},"deficient?":e=>Y(e),"deficient-take-while":e=>{const t=[];for(let r=1;;r+=1)if(Y(r)){if(!e(r,t.length))break;t.push(r)}return t}};const te={"geometric-seq":{evaluate:([e,t,r],n)=>(l(e,n,{finite:!0}),l(t,n,{finite:!0}),l(r,n,{integer:!0,positive:!0}),Array.from({length:r},(r,n)=>e*t**n)),arity:x(3)},"geometric-take-while":{evaluate:([e,t,r],n,o,{executeFunction:i})=>{l(e,n,{finite:!0}),l(t,n,{finite:!0}),w(r,n);const a=[];for(let s=0;;s+=1){const m=e*t**s;if(!i(r,[m,s],o,n))break;a[s]=m}return a},arity:x(3)},"geometric-nth":{evaluate:([e,t,r],n)=>(l(e,n,{finite:!0}),l(t,n,{finite:!0}),l(r,n,{integer:!0,positive:!0}),e*t**(r-1)),arity:x(3)},"geometric?":{evaluate:([e,t,r],n)=>(l(r,n),l(e,n,{finite:!0}),l(t,n,{finite:!0}),function(e,t,r){if(J(e,0))return J(r,0);if(J(t,1))return J(r,e);if(J(t,0))return J(r,0)||J(r,e);if(J(r,e))return!0;if(J(t,-1))return J(r,e)||J(r,-e);if(t<0){const n=Math.log(Math.abs(r/e))/Math.log(Math.abs(t)),o=Math.round(n);if(!J(o,n)||o<0)return!1;const i=o%2==0?Math.sign(e):Math.sign(e)*Math.sign(t);return Math.sign(r)===i}if(t>1&&r<e||t<1&&r>e)return!1;const n=Math.log(r/e)/Math.log(t),o=Math.round(n);return!(!J(o,n)||o<0)&&J(e*t**o,r)}(e,t,r)),arity:x(3)}};const re={"golomb-seq":e=>function(e){const t=[0,1];for(let r=2;r<=e;r+=1)t.push(1+t[r-t[t[r-1]]]);return t.slice(1)}(e),"golomb?":()=>!0,"golomb-take-while":e=>function(e){if(!e(1,0))return[];const t=[0,1];for(let r=2;;r++){const n=1+t[r-t[t[r-1]]];if(!e(n,r-1))break;t.push(n)}return t.slice(1)}(e)};function ne(e){let t=0;for(;e>0;){const r=e%10;t+=r*r,e=Math.floor(e/10)}return t}const oe={"happy-seq":e=>{const t=[];for(let r=1;t.length<e;r++){let e=r;const n=new Set;for(;1!==e&&!n.has(e);)n.add(e),e=String(e).split("").reduce((e,t)=>e+Number(t)**2,0);1===e&&t.push(r)}return t},"happy?":e=>function(e){if(e<=0)return!1;const t=new Set;for(;1!==e&&!t.has(e);)t.add(e),e=ne(e);return 1===e}(e),"happy-take-while":e=>{const t=[];for(let r=1;;r++){let n=r;const o=new Set;for(;1!==n&&!o.has(n);)o.add(n),n=String(n).split("").reduce((e,t)=>e+Number(t)**2,0);if(1===n){if(!e(r,t.length))break;t.push(r)}}return t}},ie={"juggler-seq":e=>{let t=e;const r=[t];for(;t>1;)t=t%2==0?Math.floor(Math.sqrt(t)):Math.floor(t**1.5),r.push(t);return r},noNth:!0};function ae(e){let t="",r=1;for(let n=0;n<e.length;n++)n+1<e.length&&e[n]===e[n+1]?r++:(t+=r.toString()+e[n],r=1);return t}const se={string:!0,"look-and-say-seq":e=>{const t=["1"];for(let r=1;r<e;r+=1){const e=t[r-1].replace(/(\d)\1*/g,e=>`${e.length}${e[0]}`);t[r]=e}return t},"look-and-say-take-while":e=>{if(!e("1",0))return[];const t=["1"];for(let r=1;;r+=1){const n=t[r-1].replace(/(\d)\1*/g,e=>`${e.length}${e[0]}`);if(!e(n,r))break;t[r]=n}return t},"look-and-say?":e=>function(e){let t="1";if(t===e)return!0;for(;;){if(t=ae(t),t===e)return!0;if(t.length>e.length)return!1}}(e)};function me(e){const t=[];for(let e=1;e<=2e3;e++)t.push(e);let r=[1];for(let e=1;e<t.length;e++)t[e]%2!=0&&r.push(t[e]);const n=[1];let o=1;if(!e(1,0))return[];let i=1;for(;i<r.length;){const t=r[i];if(!e(t,o))break;n.push(t),o++;const a=t,s=[];for(let e=0;e<r.length;e++)(e+1)%a!==0&&s.push(r[e]);if(r=s,i++,i>=r.length-5){let e=r[r.length-1]+2;for(;r.length<i+1e3;)r.push(e),e+=2}}return n}const ue={"lucky-seq":e=>function(e){const t=[];let r=1;const n=e*(e<100?20:30);for(;t.length<n;)t.push(r),r+=2;let o=1;for(;o<t.length&&o<e;){const e=t[o];let r=0;for(let n=0;n<t.length;n++)(n+1)%e!==0&&(t[r++]=t[n]);t.length=r,o<t.length&&o++}return t.slice(0,e)}(e),"lucky?":e=>me(t=>t<=e).includes(e),"lucky-take-while":e=>me(e)};const he={"padovan-seq":e=>{const t=[1,1,1];for(let r=3;r<e;r+=1)t[r]=t[r-2]+t[r-3];return t.slice(0,e)},"padovan?":e=>function(e){if(!Number.isInteger(e)||e<=0)return!1;if(1===e)return!0;const t=[1,1,1,2,2,3,4,5,7,9,12,16,21,28,37,49,65,86,114,151,200,265,351,465,616,816,1081,1432,1897,2513,3329,4410,5842,7739,10252,13581,17991,23833,31572,41824,55405,73396,97229];if(t.includes(e))return!0;if(e>t[t.length-1]&&e<=Number.MAX_SAFE_INTEGER){let r,n=t[t.length-3],o=t[t.length-2],i=t[t.length-1];for(;i<e;){if(r=n+o,n=o,o=i,i=r,i===e)return!0;if(!Number.isSafeInteger(i))return!1}}return!1}(e),"padovan-take-while":e=>{const t=[];if(!e(1,0))return t;if(t.push(1),!e(1,1))return t;if(t.push(1),!e(1,2))return t;t.push(1);let r=1,n=1,o=1;for(let i=4;;i+=1){const a=r+n;if(r=n,n=o,o=a,!e(o,i))break;t.push(o)}return t}},ce={"perfect-cube-seq":e=>{const t=[];for(let r=1;r<=e;r++)t.push(r**3);return t},"perfect-cube?":e=>e>0&&Number.isInteger(Math.cbrt(e)),"perfect-cube-take-while":e=>{const t=[];for(let r=1;;r++){const n=r**3;if(!e(n,r))break;t.push(n)}return t}};function le(e){if(e<2)return 1===e?[1,2]:null;const t=Math.floor(Math.log2(e))+1;for(let r=2;r<=t;r++){const t=e**(1/r),n=Math.round(t);if(J(n**r,e))return[n,r]}return null}const pe={"perfect-power-seq":e=>{const t=[];for(let r=1;t.length<e;r++)le(r)&&t.push(r);return t},"perfect-power?":e=>null!==le(e),"perfect-power-take-while":e=>{const t=[];for(let r=1;;r++)if(le(r)){if(!e(r,t.length))break;t.push(r)}return t}},ye={"perfect-square-seq":e=>{const t=[];for(let r=1;r<=e;r++)t.push(r**2);return t},"perfect-square?":e=>e>0&&Number.isInteger(Math.sqrt(e)),"perfect-square-take-while":e=>{const t=[];for(let r=1;;r++){const n=r**2;if(!e(n,r))break;t.push(n)}return t}},be={"polygonal-seq":{evaluate:([e,t],r)=>{l(e,r,{integer:!0,gte:3}),l(t,r,{integer:!0,positive:!0});const n=[];for(let r=1;r<=t;r+=1)n[r-1]=(r*r*(e-2)-r*(e-4))/2;return n},arity:x(2)},"polygonal-take-while":{evaluate:([e,t],r,n,{executeFunction:o})=>{l(e,r,{integer:!0,gte:3}),w(t,r);const i=[];for(let a=1;;a+=1){if(!o(t,[(a*a*(e-2)-a*(e-4))/2,a],n,r))break;i[a-1]=(a*a*(e-2)-a*(e-4))/2}return i},arity:x(2)},"polygonal-nth":{evaluate:([e,t],r)=>(l(e,r,{integer:!0,gte:3}),l(t,r,{integer:!0,positive:!0}),(t*t*(e-2)-t*(e-4))/2),arity:x(2)},"polygonal?":{evaluate:([e,t],r)=>{if(l(t,r,{integer:!0}),l(e,r,{integer:!0,gte:3}),t<=0)return!1;const n=e-2,o=e-4,i=8*n*t+o*o,a=Math.sqrt(i);if(!Number.isInteger(a))return!1;const s=a+o;if(s%(2*n)!=0)return!1;const m=s/(2*n);return Number.isInteger(m)&&m>0},arity:x(2)}};const ge={"recaman-seq":e=>function(e){if(1===e)return[0];const t=[0],r=new Set([0]);for(let n=1;n<e;n++){let e=t[n-1]-n;(e<=0||r.has(e))&&(e=t[n-1]+n),t.push(e),r.add(e)}return t}(e),"recaman-take-while":e=>{if(!e(0,0))return[];const t=[0],r=new Set([0]);for(let n=1;;n++){let o=t[n-1]-n;if((o<=0||r.has(o))&&(o=t[n-1]+n),!e(o,n))break;t.push(o),r.add(o)}return t},"recaman?":()=>!0},fe={"thue-morse-seq":e=>{const t=[];for(let r=0;r<e;r+=1)t[r]=de(r)%2;return t},"thue-morse-take-while":e=>{const t=[];for(let r=0;;r+=1){const n=de(r)%2;if(!e(n,r))break;t[r]=n}return t},"thue-morse?":e=>1===e||0===e};function de(e){let t=0;for(;e;)t+=1&e,e>>=1;return t}const qe={};function ve(e){for(const[t,r]of Object.entries(e)){if(qe[t])throw new Error(`Duplicate normal expression key found: ${t}`);qe[t]=r}}function ke(e,t){return{[`${e}-seq`]:xe(e=>t.slice(0,e),t.length),[`${e}-take-while`]:Ae(e=>{let r=0;for(r=0;!(r>=t.length)&&e(t[r],r);r+=1);return t.slice(0,r)},t.length),[`${e}-nth`]:Ne(()=>t,t.length),[`${e}?`]:Te(e=>t.includes(e))}}function we(e){for(const[t,r]of Object.entries(e)){if(qe[t])throw new Error(`Duplicate normal expression key found: ${t}`);t.endsWith("seq")?(qe[t]=xe(r,e.maxLength),e.noNth||(qe[t.replace(/seq$/,"nth")]=Ne(r,e.maxLength))):t.endsWith("take-while")?qe[t]=Ae(r,e.maxLength):t.endsWith("?")&&(e.string?qe[t]=Ge(r):qe[t]=Te(r))}}function xe(e,r){return{evaluate:(n,o)=>{const i=n[0]??r;l(i,o,{integer:!0,positive:!0,lte:r});const a=e(i,o);if("number"==typeof a[0]&&a.some(e=>e>Number.MAX_SAFE_INTEGER))throw new t("Result exceeds maximum safe integer",o);return a},arity:"number"==typeof r?{max:1}:x(1)}}function Ae(e,r){return{evaluate:(r,n,o,{executeFunction:i})=>{const a=r[0];w(a,n);const s=e((e,t)=>!!i(a,[e,t],o),n);if("number"==typeof s[0]&&s.some(e=>e>Number.MAX_SAFE_INTEGER))throw new t("Result exceeds maximum safe integer",n);return s},arity:"number"==typeof r?{max:1}:x(1)}}function Ne(e,r){return{evaluate:(n,o)=>{const i=n[0];l(i,o,{integer:!0,positive:!0,lte:r});const a=e(i,o);if("number"==typeof a[0]&&a.some(e=>e>Number.MAX_SAFE_INTEGER))throw new t("Result exceeds maximum safe integer",o);return a[i-1]},arity:x(1)}}function Te(e){return{evaluate:(t,r)=>{const n=t[0];return l(n,r),e(n,r)},arity:x(1)}}function Ge(e){return{evaluate:(t,r)=>{const n=t[0];return function(e,t,r={}){if(!function(e,t={}){return!("string"!=typeof e||t.nonEmpty&&0===e.length||t.char&&1!==e.length)}(e,r))throw f(r.nonEmpty?"non empty string":r.char?"character":"string",e,t)}(n,r),e(n,r)},arity:x(1)}}function $e(e,t){for(;0!==t;){const r=t;t=e%t,e=r}return Math.abs(e)}function Ce(e,t){return Math.floor(e*t/$e(e,t))}function We(e){if(1===e)return 1;const t=B(e);return new Set(t).size!==t.length?0:t.length%2==0?1:-1}function Me(e,t){if(0===t)return[e,1,0];const[r,n,o]=Me(t,e%t);return[r,o,n-Math.floor(e/t)*o]}function Se(e,t){const[r,n]=Me(e,t);if(1!==r)throw new Error(`Modular inverse does not exist (gcd(${e}, ${t}) = ${r})`);return(n%t+t)%t}we(_),we({"collatz-seq":e=>{let t=e;const r=[t];for(;1!==t;)t%2==0?t/=2:t=3*t+1,r.push(t);return r},noNth:!0}),we(V),we(ee),we(re),we(oe),we(ie),we(se),we(ue),we(he),we(ye),we(ce),we(pe),we(K),we(ge),we(fe),ve(ke("tribonacci",[0,1,1,2,4,7,13,24,44,81,149,274,504,927,1705,3136,5768,10609,19513,35890,66012,121415,223317,410744,755476,1389537,2555757,4700770,8646064,15902591,29249425,53798080,98950096,181997601,334745777,615693474,1132436852,2082876103,3831006429,7046319384,12960201916,23837527729,43844049029,80641778674,148323355432,272809183135,501774317241,922906855808,1697490356184,3122171529233,5742568741225,0x99b36012952,19426970897100,35731770264967,65720971788709,0x6df08059d9f8,0xca35cf00a924,408933139743937,752145307699165,0x4ea34736b35c2,0x90a3317d5c260,4680045560037375,8607945812375585])),ve(ke("catalan",[1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,2674440,9694845,35357670,129644790,477638700,1767263190,6564120420,24466267020,91482563640,343059613650,1289904147324,4861946401452,18367353072152,69533550916004,0xefe09af96cd8,0x38f88b34d6a68,0xd8db5c347b610])),ve(ke("factorial",E)),ve(ke("fibonacci",[0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,4807526976,7778742049,12586269025,20365011074,32951280099,53316291173,86267571272,139583862445,225851433717,365435296162,591286729879,956722026041,1548008755920,2504730781961,4052739537881,6557470319842,0x9a661ca20bb,0xf9d297a859d,27777890035288,44945570212853,72723460248141,0x6b04f4c2fe42,0xad2934c6d08f,308061521170129,498454011879264,806515533049393,0x4a2dce62b0d91,0x780626e057bc2,0xc233f54308953,5527939700884757,8944394323791464])),ve(ke("lucas",[2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803,141422324,228826127,370248451,599074578,969323029,1568397607,2537720636,4106118243,6643838879,10749957122,17393796001,28143753123,45537549124,73681302247,119218851371,192900153618,312119004989,505019158607,817138163596,1322157322203,2139295485799,3461452808002,5600748293801,9062201101803,0xd55fbe3dc94,23725150497407,38388099893011,62113250390418,0x5b67cb4878a5,0x93e5a9822a37,0xef4d74caa2dc,425730551631123,688846502588399,0x3f5b3b1643d02,0x66834447bacf1,0xa5de7f5dfe9f3,4721424167835364,7639424778862807])),ve(ke("mersenne",[3,7,31,127,2047,8191,131071,524287,2147483647])),ve(ke("partition",z)),ve(ke("pell",[1,2,5,12,29,70,169,408,985,2378,5741,13860,33461,80782,195025,470832,1136689,2744210,6625109,15994428,38613965,93222358,225058681,543339720,1311738121,3166815962,7645370045,18457556052,44560482149,107578520350,259717522849,627013566048,1513744654945,3654502875938,8822750406821,21300003689580,51422757785981,0x70e8e1937766,299713796309065,723573111879672,0x634c28af7f039,0xefb9b143d586a])),ve(ke("perfect",[6,28,496,8128,33550336,8589869056,137438691328])),ve(ke("sylvester",[2,6,42,1806,3263442,0x9afa8dc8416])),ve(ke("bell",[1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,27644437,190899322,1382958545,10480142147,82864869804,682076806159,5832742205057,51724158235372,474869816156751,4506715738447323])),ve(X),ve(Z),ve(te),ve(be);const Ee={"coprime?":{evaluate:([e,t],r)=>(l(e,r,{integer:!0}),l(t,r,{integer:!0}),1===$e(e,t)),arity:x(2)},"divisible-by?":{evaluate:([e,t],r)=>(l(e,r,{integer:!0}),l(t,r,{integer:!0}),0!==t&&e%t===0),arity:x(2)},gcd:{evaluate:([e,t],r)=>(l(e,r),l(t,r),$e(e,t)),arity:x(2)},lcm:{evaluate:([e,t],r)=>(l(e,r),l(t,r),Ce(e,t)),arity:x(2)},multinomial:{evaluate:([...e],t)=>{g(e,t);return R(e.reduce((e,r)=>(l(r,t,{integer:!0,nonNegative:!0}),e+r),0))/e.reduce((e,t)=>e*R(t),1)},arity:{min:1}},"amicable?":{evaluate:([e,t],r)=>{l(e,r,{integer:!0,positive:!0}),l(t,r,{integer:!0,positive:!0});const n=M(e).reduce((e,t)=>e+t,0),o=M(t).reduce((e,t)=>e+t,0);return n===t&&o===e&&e!==t},arity:x(2)},"euler-totient":{evaluate:([e],t)=>{l(e,t,{integer:!0,positive:!0});let r=e;for(let t=2;t*t<=e;t+=1)if(e%t===0){for(;e%t===0;)e/=t;r-=r/t}return e>1&&(r-=r/e),r},arity:x(1)},mobius:{evaluate:([e],t)=>{if(l(e,t,{integer:!0,positive:!0}),1===e)return 1;const r=B(e);return new Set(r).size!==r.length?0:r.length%2==0?1:-1},arity:x(1)},mertens:{evaluate:([e],t)=>{if(l(e,t,{integer:!0,positive:!0}),1===e)return 1;let r=0;for(let t=1;t<=e;t++){r+=We(t)}return r},arity:x(1)},sigma:{evaluate:([e],t)=>(l(e,t,{integer:!0,positive:!0}),W(e).reduce((e,t)=>e+t,0)),arity:x(1)},"carmichael-lambda":{evaluate:([e],t)=>{if(l(e,t,{integer:!0,positive:!0}),1===e)return 1;const r=B(e),n=new Map;for(const e of r)n.set(e,(n.get(e)||0)+1);const o=[];for(const[e,t]of n.entries())2===e?1===t?o.push(1):2===t?o.push(2):o.push(2**(t-2)):o.push((e-1)*e**(t-1));return o.reduce((e,t)=>Ce(e,t),1)},arity:x(1)},"cartesian-product":{evaluate:(e,t)=>{e.forEach(e=>{d(e,t)});return e.reduce((e,t)=>{const r=[];return e.forEach(e=>{t.forEach(t=>{r.push([...e,t])})}),r},[[]])},arity:{min:1}},"perfect-power":{evaluate:([e],t)=>{l(e,t,{integer:!0,positive:!0});return le(e)||null},arity:x(1)},"mod-exp":{evaluate:([e,t,r],n)=>(l(e,n,{finite:!0}),l(t,n,{integer:!0,positive:!0}),l(r,n,{integer:!0,positive:!0}),function(e,t,r){if(1===r)return 0;let n=1;for(e%=r;t>0;)t%2==1&&(n=n*e%r),t>>=1,e=e*e%r;return n}(e,t,r)),arity:x(3)},"mod-inv":{evaluate:([e,r],n)=>{l(e,n,{integer:!0,positive:!0}),l(r,n,{integer:!0,positive:!0});try{return Se(e,r)}catch(e){throw new t(e,n)}},arity:x(2)},"extended-gcd":{evaluate:([e,t],r)=>(l(e,r,{integer:!0}),l(t,r,{integer:!0}),Me(e,t)),arity:x(2)},"chinese-remainder":{evaluate:([e,r],n)=>{if(g(e,n),g(r,n),e.length!==r.length)throw new t("Remainders and moduli must have the same length.",n);try{return function(e,t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){const n=Me(t[e],t[r])[0];if(1!==n)throw new Error(`Moduli must be pairwise coprime, but gcd(${t[e]}, ${t[r]}) = ${n}`)}const r=t.reduce((e,t)=>e*t,1);let n=0;for(let o=0;o<e.length;o++){const i=e[o],a=t[o],s=r/a;n=(n+i*s*Se(s,a))%r}return n}(e,r)}catch(e){throw new t(e.message,n)}},arity:x(2)},"stirling-first":{evaluate:([e,t],r)=>{l(e,r,{integer:!0,positive:!0}),l(t,r,{integer:!0,positive:!0,lte:e});const n=Array.from({length:e+1},()=>Array(t+1).fill(0));n[0][0]=1;for(let r=1;r<=e;r++)for(let e=1;e<=Math.min(r,t);e++)n[r][e]=n[r-1][e-1]+(r-1)*n[r-1][e];return n[e][t]},arity:x(2)},"stirling-second":{evaluate:([e,t],r)=>{if(l(e,r,{integer:!0,positive:!0}),l(t,r,{integer:!0,positive:!0,lte:e}),1===t)return 1;if(t===e)return 1;const n=Array.from({length:e+1},()=>Array(t+1).fill(0));n[0][0]=1;for(let r=1;r<=e;r++)for(let e=1;e<=Math.min(r,t);e++)n[r][e]=e*n[r-1][e]+n[r-1][e-1];return n[e][t]},arity:x(2)}};function Re(e){for(const[t,r]of Object.entries(e)){if(Ee[t])throw new Error(`Duplicate normal expression key found: ${t}`);Ee[t]=r}}!function(e){for(const[t,r]of Object.entries(e)){if(Ee[t])throw new Error(`Duplicate normal expression key found: ${t}`);Ee[t]=r}}(qe),Re(I),Re(S),Re(G),Re(P),Re(j),Re(L),Re($),Re(F);for(const[e,t]of Object.entries(A))Ee[e]&&(Ee[e].docs=t);const Ie={name:"number-theory",functions:Ee};exports.numberTheoryModule=Ie;
2
+ //# sourceMappingURL=number-theory.js.map