@mojir/dvala 0.0.1 → 0.0.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.
- package/LICENSE +1 -1
- package/README.md +1613 -4
- package/dist/bundler.esm.js +2 -0
- package/dist/bundler.esm.js.map +1 -0
- package/dist/bundler.js +2 -0
- package/dist/bundler.js.map +1 -0
- package/dist/cli/cli/src/cli.d.ts +2 -0
- package/dist/cli/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
- package/dist/cli/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
- package/dist/cli/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
- package/dist/cli/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
- package/dist/cli/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
- package/dist/cli/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
- package/dist/cli/cli/src/cliDocumentation/getCliType.d.ts +3 -0
- package/dist/cli/cli/src/cliFormatterRules.d.ts +13 -0
- package/dist/cli/cli/src/colorizer.d.ts +939 -0
- package/dist/cli/cli/src/createReadlineInterface.d.ts +5 -0
- package/dist/cli/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/cli/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/cli/cli/src/js-interop/Cli/index.d.ts +2 -0
- package/dist/cli/cli.js +38614 -0
- package/dist/cli/common/createFormatter.d.ts +6 -0
- package/dist/cli/common/utils.d.ts +2 -0
- package/dist/cli/reference/api.d.ts +75 -0
- package/dist/cli/reference/datatype.d.ts +3 -0
- package/dist/cli/reference/effect.d.ts +3 -0
- package/dist/cli/reference/examples.d.ts +11 -0
- package/dist/cli/reference/index.d.ts +191 -0
- package/dist/cli/reference/shorthand.d.ts +3 -0
- package/dist/cli/src/AutoCompleter/AutoCompleter.d.ts +25 -0
- package/dist/cli/src/Dvala/Cache.d.ts +16 -0
- package/dist/cli/src/Dvala/Dvala.d.ts +68 -0
- package/dist/cli/src/allModules.d.ts +2 -0
- package/dist/cli/src/builtin/bindingNode.d.ts +11 -0
- package/dist/cli/src/builtin/core/array.d.ts +2 -0
- package/dist/cli/src/builtin/core/assertion.d.ts +2 -0
- package/dist/cli/src/builtin/core/bitwise.d.ts +2 -0
- package/dist/cli/src/builtin/core/collection.d.ts +2 -0
- package/dist/cli/src/builtin/core/functional.d.ts +2 -0
- package/dist/cli/src/builtin/core/math.d.ts +2 -0
- package/dist/cli/src/builtin/core/meta.d.ts +3 -0
- package/dist/cli/src/builtin/core/misc.d.ts +2 -0
- package/dist/cli/src/builtin/core/object.d.ts +2 -0
- package/dist/cli/src/builtin/core/predicates.d.ts +2 -0
- package/dist/cli/src/builtin/core/regexp.d.ts +2 -0
- package/dist/cli/src/builtin/core/sequence.d.ts +2 -0
- package/dist/cli/src/builtin/core/string.d.ts +2 -0
- package/dist/cli/src/builtin/core/vector.d.ts +2 -0
- package/dist/cli/src/builtin/index.d.ts +13 -0
- package/dist/cli/src/builtin/interface.d.ts +113 -0
- package/dist/cli/src/builtin/modules/assertion/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/assertion/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/convert/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/cli/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/cli/src/builtin/modules/interface.d.ts +11 -0
- package/dist/cli/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/cli/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/index.d.ts +27 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/cli/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/cli/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/cli/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/cli/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/cli/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/cli/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/cli/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/cli/src/builtin/normalExpressions/index.d.ts +8 -0
- package/dist/cli/src/builtin/specialExpressionTypes.d.ts +26 -0
- package/dist/cli/src/builtin/specialExpressions/and.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/cond.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/cli/src/builtin/specialExpressions/effect.d.ts +5 -0
- package/dist/cli/src/builtin/specialExpressions/functions.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/if.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/import.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/let.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/loop.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/loops.d.ts +9 -0
- package/dist/cli/src/builtin/specialExpressions/match.d.ts +7 -0
- package/dist/cli/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/or.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/parallel.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/perform.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/qq.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/race.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/recur.d.ts +5 -0
- package/dist/cli/src/builtin/specialExpressions/throw.d.ts +5 -0
- package/dist/cli/src/builtin/specialExpressions/try.d.ts +7 -0
- package/dist/cli/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/cli/src/builtin/utils.d.ts +6 -0
- package/dist/cli/src/bundler/index.d.ts +9 -0
- package/dist/cli/src/bundler/interface.d.ts +15 -0
- package/dist/cli/src/bundler.d.ts +3 -0
- package/dist/cli/src/cli.d.ts +2 -0
- package/dist/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
- package/dist/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
- package/dist/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
- package/dist/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
- package/dist/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
- package/dist/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
- package/dist/cli/src/cliDocumentation/getCliType.d.ts +3 -0
- package/dist/cli/src/cliFormatterRules.d.ts +13 -0
- package/dist/cli/src/colorizer.d.ts +939 -0
- package/dist/cli/src/constants/constants.d.ts +19 -0
- package/dist/cli/src/createReadlineInterface.d.ts +5 -0
- package/dist/cli/src/effects.d.ts +106 -0
- package/dist/cli/src/errors.d.ts +24 -0
- package/dist/cli/src/evaluator/ContextStack.d.ts +65 -0
- package/dist/cli/src/evaluator/effectRef.d.ts +27 -0
- package/dist/cli/src/evaluator/effectTypes.d.ts +79 -0
- package/dist/cli/src/evaluator/frames.d.ts +525 -0
- package/dist/cli/src/evaluator/interface.d.ts +14 -0
- package/dist/cli/src/evaluator/serialization.d.ts +45 -0
- package/dist/cli/src/evaluator/standardEffects.d.ts +35 -0
- package/dist/cli/src/evaluator/step.d.ts +159 -0
- package/dist/cli/src/evaluator/suspension.d.ts +53 -0
- package/dist/cli/src/evaluator/trampoline.d.ts +119 -0
- package/dist/cli/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/cli/src/index.d.ts +18 -0
- package/dist/cli/src/initReferenceData.d.ts +1 -0
- package/dist/cli/src/interface.d.ts +7 -0
- package/dist/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/cli/src/js-interop/Cli/index.d.ts +2 -0
- package/dist/cli/src/parser/ParserContext.d.ts +20 -0
- package/dist/cli/src/parser/getPrecedence.d.ts +3 -0
- package/dist/cli/src/parser/helpers.d.ts +19 -0
- package/dist/cli/src/parser/index.d.ts +5 -0
- package/dist/cli/src/parser/subParsers/parseArray.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseBindingTarget.d.ts +8 -0
- package/dist/cli/src/parser/subParsers/parseCond.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseDo.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseExpression.d.ts +5 -0
- package/dist/cli/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseFunction.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
- package/dist/cli/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
- package/dist/cli/src/parser/subParsers/parseLet.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseLoop.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseMatch.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseNumber.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseObject.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseOperand.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseString.d.ts +4 -0
- package/dist/cli/src/parser/subParsers/parseSymbol.d.ts +3 -0
- package/dist/cli/src/parser/subParsers/parseTry.d.ts +4 -0
- package/dist/cli/src/parser/types.d.ts +129 -0
- package/dist/cli/src/symbolPatterns.d.ts +2 -0
- package/dist/cli/src/testFramework/index.d.ts +15 -0
- package/dist/cli/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/cli/src/tokenizer/operators.d.ts +12 -0
- package/dist/cli/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/cli/src/tokenizer/token.d.ts +84 -0
- package/dist/cli/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/cli/src/tokenizer/tokenizers.d.ts +14 -0
- package/dist/cli/src/transformer/index.d.ts +2 -0
- package/dist/cli/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/cli/src/typeGuards/array.d.ts +9 -0
- package/dist/cli/src/typeGuards/astNode.d.ts +19 -0
- package/dist/cli/src/typeGuards/dvala.d.ts +26 -0
- package/dist/cli/src/typeGuards/dvalaFunction.d.ts +12 -0
- package/dist/cli/src/typeGuards/index.d.ts +7 -0
- package/dist/cli/src/typeGuards/number.d.ts +66 -0
- package/dist/cli/src/typeGuards/string.d.ts +15 -0
- package/dist/cli/src/untokenizer/index.d.ts +2 -0
- package/dist/cli/src/utils/arity.d.ts +10 -0
- package/dist/cli/src/utils/debug/debugTools.d.ts +1 -0
- package/dist/cli/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/cli/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
- package/dist/cli/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/cli/src/utils/getAssertionError.d.ts +3 -0
- package/dist/cli/src/utils/index.d.ts +14 -0
- package/dist/cli/src/utils/maybePromise.d.ts +54 -0
- package/dist/cli/src/utils/symbols.d.ts +3 -0
- package/dist/common/createFormatter.d.ts +6 -0
- package/dist/common/utils.d.ts +2 -0
- package/dist/debug.esm.js +2 -0
- package/dist/debug.esm.js.map +1 -0
- package/dist/debug.js +2 -0
- package/dist/debug.js.map +1 -0
- package/dist/dvala.iife.js +2 -0
- package/dist/dvala.iife.js.map +1 -0
- package/dist/full.esm.js +2 -0
- package/dist/full.esm.js.map +1 -0
- package/dist/full.js +2 -0
- package/dist/full.js.map +1 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/assertion.esm.js +2 -0
- package/dist/modules/assertion.esm.js.map +1 -0
- package/dist/modules/assertion.js +2 -0
- package/dist/modules/assertion.js.map +1 -0
- package/dist/modules/bitwise.esm.js +2 -0
- package/dist/modules/bitwise.esm.js.map +1 -0
- package/dist/modules/bitwise.js +2 -0
- package/dist/modules/bitwise.js.map +1 -0
- package/dist/modules/cli/src/cli.d.ts +2 -0
- package/dist/modules/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
- package/dist/modules/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliType.d.ts +3 -0
- package/dist/modules/cli/src/cliFormatterRules.d.ts +13 -0
- package/dist/modules/cli/src/colorizer.d.ts +939 -0
- package/dist/modules/cli/src/createReadlineInterface.d.ts +5 -0
- package/dist/modules/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/modules/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/modules/cli/src/js-interop/Cli/index.d.ts +2 -0
- package/dist/modules/collection.esm.js +2 -0
- package/dist/modules/collection.esm.js.map +1 -0
- package/dist/modules/collection.js +2 -0
- package/dist/modules/collection.js.map +1 -0
- package/dist/modules/common/createFormatter.d.ts +6 -0
- package/dist/modules/common/utils.d.ts +2 -0
- package/dist/modules/convert.esm.js +2 -0
- package/dist/modules/convert.esm.js.map +1 -0
- package/dist/modules/convert.js +2 -0
- package/dist/modules/convert.js.map +1 -0
- package/dist/modules/functional.esm.js +2 -0
- package/dist/modules/functional.esm.js.map +1 -0
- package/dist/modules/functional.js +2 -0
- package/dist/modules/functional.js.map +1 -0
- package/dist/modules/grid.esm.js +2 -0
- package/dist/modules/grid.esm.js.map +1 -0
- package/dist/modules/grid.js +2 -0
- package/dist/modules/grid.js.map +1 -0
- package/dist/modules/linear-algebra.esm.js +2 -0
- package/dist/modules/linear-algebra.esm.js.map +1 -0
- package/dist/modules/linear-algebra.js +2 -0
- package/dist/modules/linear-algebra.js.map +1 -0
- package/dist/modules/math.esm.js +2 -0
- package/dist/modules/math.esm.js.map +1 -0
- package/dist/modules/math.js +2 -0
- package/dist/modules/math.js.map +1 -0
- package/dist/modules/matrix.esm.js +2 -0
- package/dist/modules/matrix.esm.js.map +1 -0
- package/dist/modules/matrix.js +2 -0
- package/dist/modules/matrix.js.map +1 -0
- package/dist/modules/number-theory.esm.js +2 -0
- package/dist/modules/number-theory.esm.js.map +1 -0
- package/dist/modules/number-theory.js +2 -0
- package/dist/modules/number-theory.js.map +1 -0
- package/dist/modules/random.esm.js +2 -0
- package/dist/modules/random.esm.js.map +1 -0
- package/dist/modules/random.js +2 -0
- package/dist/modules/random.js.map +1 -0
- package/dist/modules/reference/api.d.ts +75 -0
- package/dist/modules/reference/datatype.d.ts +3 -0
- package/dist/modules/reference/effect.d.ts +3 -0
- package/dist/modules/reference/index.d.ts +191 -0
- package/dist/modules/reference/shorthand.d.ts +3 -0
- package/dist/modules/sequence.esm.js +2 -0
- package/dist/modules/sequence.esm.js.map +1 -0
- package/dist/modules/sequence.js +2 -0
- package/dist/modules/sequence.js.map +1 -0
- package/dist/modules/src/AutoCompleter/AutoCompleter.d.ts +25 -0
- package/dist/modules/src/Dvala/Cache.d.ts +16 -0
- package/dist/modules/src/Dvala/Dvala.d.ts +68 -0
- package/dist/modules/src/allModules.d.ts +2 -0
- package/dist/modules/src/builtin/bindingNode.d.ts +11 -0
- package/dist/modules/src/builtin/core/array.d.ts +2 -0
- package/dist/modules/src/builtin/core/assertion.d.ts +2 -0
- package/dist/modules/src/builtin/core/bitwise.d.ts +2 -0
- package/dist/modules/src/builtin/core/collection.d.ts +2 -0
- package/dist/modules/src/builtin/core/functional.d.ts +2 -0
- package/dist/modules/src/builtin/core/math.d.ts +2 -0
- package/dist/modules/src/builtin/core/meta.d.ts +3 -0
- package/dist/modules/src/builtin/core/misc.d.ts +2 -0
- package/dist/modules/src/builtin/core/object.d.ts +2 -0
- package/dist/modules/src/builtin/core/predicates.d.ts +2 -0
- package/dist/modules/src/builtin/core/regexp.d.ts +2 -0
- package/dist/modules/src/builtin/core/sequence.d.ts +2 -0
- package/dist/modules/src/builtin/core/string.d.ts +2 -0
- package/dist/modules/src/builtin/core/vector.d.ts +2 -0
- package/dist/modules/src/builtin/index.d.ts +13 -0
- package/dist/modules/src/builtin/interface.d.ts +113 -0
- package/dist/modules/src/builtin/modules/assertion/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/assertion/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/convert/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/modules/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/modules/src/builtin/modules/interface.d.ts +11 -0
- package/dist/modules/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/modules/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/index.d.ts +27 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/modules/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/modules/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/modules/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/modules/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/modules/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/modules/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/modules/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/modules/src/builtin/normalExpressions/index.d.ts +8 -0
- package/dist/modules/src/builtin/specialExpressionTypes.d.ts +26 -0
- package/dist/modules/src/builtin/specialExpressions/and.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/cond.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/effect.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/functions.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/if.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/import.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/let.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/loop.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/loops.d.ts +9 -0
- package/dist/modules/src/builtin/specialExpressions/match.d.ts +7 -0
- package/dist/modules/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/or.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/parallel.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/perform.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/qq.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/race.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/recur.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/throw.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/try.d.ts +7 -0
- package/dist/modules/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/modules/src/builtin/utils.d.ts +6 -0
- package/dist/modules/src/bundler/index.d.ts +9 -0
- package/dist/modules/src/bundler/interface.d.ts +15 -0
- package/dist/modules/src/bundler.d.ts +3 -0
- package/dist/modules/src/constants/constants.d.ts +19 -0
- package/dist/modules/src/debug.d.ts +115 -0
- package/dist/modules/src/effects.d.ts +106 -0
- package/dist/modules/src/errors.d.ts +24 -0
- package/dist/modules/src/evaluator/ContextStack.d.ts +65 -0
- package/dist/modules/src/evaluator/effectRef.d.ts +27 -0
- package/dist/modules/src/evaluator/effectTypes.d.ts +79 -0
- package/dist/modules/src/evaluator/frames.d.ts +525 -0
- package/dist/modules/src/evaluator/interface.d.ts +14 -0
- package/dist/modules/src/evaluator/serialization.d.ts +45 -0
- package/dist/modules/src/evaluator/standardEffects.d.ts +35 -0
- package/dist/modules/src/evaluator/step.d.ts +159 -0
- package/dist/modules/src/evaluator/suspension.d.ts +53 -0
- package/dist/modules/src/evaluator/trampoline.d.ts +119 -0
- package/dist/modules/src/full.d.ts +17 -0
- package/dist/modules/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/modules/src/index.d.ts +18 -0
- package/dist/modules/src/initReferenceData.d.ts +1 -0
- package/dist/modules/src/interface.d.ts +7 -0
- package/dist/modules/src/modules/assertion.d.ts +2 -0
- package/dist/modules/src/modules/bitwise.d.ts +2 -0
- package/dist/modules/src/modules/collection.d.ts +2 -0
- package/dist/modules/src/modules/convert.d.ts +2 -0
- package/dist/modules/src/modules/functional.d.ts +2 -0
- package/dist/modules/src/modules/grid.d.ts +2 -0
- package/dist/modules/src/modules/linear-algebra.d.ts +2 -0
- package/dist/modules/src/modules/math.d.ts +2 -0
- package/dist/modules/src/modules/matrix.d.ts +2 -0
- package/dist/modules/src/modules/number-theory.d.ts +2 -0
- package/dist/modules/src/modules/random.d.ts +2 -0
- package/dist/modules/src/modules/sequence.d.ts +2 -0
- package/dist/modules/src/modules/string.d.ts +2 -0
- package/dist/modules/src/modules/vector.d.ts +2 -0
- package/dist/modules/src/parser/ParserContext.d.ts +20 -0
- package/dist/modules/src/parser/getPrecedence.d.ts +3 -0
- package/dist/modules/src/parser/helpers.d.ts +19 -0
- package/dist/modules/src/parser/index.d.ts +5 -0
- package/dist/modules/src/parser/subParsers/parseArray.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseBindingTarget.d.ts +8 -0
- package/dist/modules/src/parser/subParsers/parseCond.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseDo.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseExpression.d.ts +5 -0
- package/dist/modules/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseFunction.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
- package/dist/modules/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
- package/dist/modules/src/parser/subParsers/parseLet.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseLoop.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseMatch.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseNumber.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseObject.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseOperand.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseString.d.ts +4 -0
- package/dist/modules/src/parser/subParsers/parseSymbol.d.ts +3 -0
- package/dist/modules/src/parser/subParsers/parseTry.d.ts +4 -0
- package/dist/modules/src/parser/types.d.ts +129 -0
- package/dist/modules/src/symbolPatterns.d.ts +2 -0
- package/dist/modules/src/testFramework/index.d.ts +15 -0
- package/dist/modules/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/modules/src/tokenizer/operators.d.ts +12 -0
- package/dist/modules/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/modules/src/tokenizer/token.d.ts +84 -0
- package/dist/modules/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/modules/src/tokenizer/tokenizers.d.ts +14 -0
- package/dist/modules/src/transformer/index.d.ts +2 -0
- package/dist/modules/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/modules/src/typeGuards/array.d.ts +9 -0
- package/dist/modules/src/typeGuards/astNode.d.ts +19 -0
- package/dist/modules/src/typeGuards/dvala.d.ts +26 -0
- package/dist/modules/src/typeGuards/dvalaFunction.d.ts +12 -0
- package/dist/modules/src/typeGuards/index.d.ts +7 -0
- package/dist/modules/src/typeGuards/number.d.ts +66 -0
- package/dist/modules/src/typeGuards/string.d.ts +15 -0
- package/dist/modules/src/untokenizer/index.d.ts +2 -0
- package/dist/modules/src/utils/arity.d.ts +10 -0
- package/dist/modules/src/utils/debug/debugTools.d.ts +1 -0
- package/dist/modules/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/modules/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
- package/dist/modules/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/modules/src/utils/getAssertionError.d.ts +3 -0
- package/dist/modules/src/utils/index.d.ts +14 -0
- package/dist/modules/src/utils/maybePromise.d.ts +54 -0
- package/dist/modules/src/utils/symbols.d.ts +3 -0
- package/dist/modules/string.esm.js +2 -0
- package/dist/modules/string.esm.js.map +1 -0
- package/dist/modules/string.js +2 -0
- package/dist/modules/string.js.map +1 -0
- package/dist/modules/vector.esm.js +2 -0
- package/dist/modules/vector.esm.js.map +1 -0
- package/dist/modules/vector.js +2 -0
- package/dist/modules/vector.js.map +1 -0
- package/dist/reference/api.d.ts +75 -0
- package/dist/reference/datatype.d.ts +3 -0
- package/dist/reference/effect.d.ts +3 -0
- package/dist/reference/index.d.ts +191 -0
- package/dist/reference/shorthand.d.ts +3 -0
- package/dist/src/AutoCompleter/AutoCompleter.d.ts +25 -0
- package/dist/src/Dvala/Cache.d.ts +16 -0
- package/dist/src/Dvala/Dvala.d.ts +68 -0
- package/dist/src/allModules.d.ts +2 -0
- package/dist/src/builtin/bindingNode.d.ts +11 -0
- package/dist/src/builtin/core/array.d.ts +2 -0
- package/dist/src/builtin/core/assertion.d.ts +2 -0
- package/dist/src/builtin/core/bitwise.d.ts +2 -0
- package/dist/src/builtin/core/collection.d.ts +2 -0
- package/dist/src/builtin/core/functional.d.ts +2 -0
- package/dist/src/builtin/core/math.d.ts +2 -0
- package/dist/src/builtin/core/meta.d.ts +3 -0
- package/dist/src/builtin/core/misc.d.ts +2 -0
- package/dist/src/builtin/core/object.d.ts +2 -0
- package/dist/src/builtin/core/predicates.d.ts +2 -0
- package/dist/src/builtin/core/regexp.d.ts +2 -0
- package/dist/src/builtin/core/sequence.d.ts +2 -0
- package/dist/src/builtin/core/string.d.ts +2 -0
- package/dist/src/builtin/core/vector.d.ts +2 -0
- package/dist/src/builtin/index.d.ts +13 -0
- package/dist/src/builtin/interface.d.ts +113 -0
- package/dist/src/builtin/modules/assertion/docs.d.ts +2 -0
- package/dist/src/builtin/modules/assertion/index.d.ts +2 -0
- package/dist/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/src/builtin/modules/convert/index.d.ts +2 -0
- package/dist/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/src/builtin/modules/interface.d.ts +11 -0
- package/dist/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/index.d.ts +27 -0
- package/dist/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/src/builtin/normalExpressions/index.d.ts +8 -0
- package/dist/src/builtin/specialExpressionTypes.d.ts +26 -0
- package/dist/src/builtin/specialExpressions/and.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/cond.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/src/builtin/specialExpressions/effect.d.ts +5 -0
- package/dist/src/builtin/specialExpressions/functions.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/if.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/import.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/let.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/loop.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/loops.d.ts +9 -0
- package/dist/src/builtin/specialExpressions/match.d.ts +7 -0
- package/dist/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/or.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/parallel.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/perform.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/qq.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/race.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/recur.d.ts +5 -0
- package/dist/src/builtin/specialExpressions/throw.d.ts +5 -0
- package/dist/src/builtin/specialExpressions/try.d.ts +7 -0
- package/dist/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/src/builtin/utils.d.ts +6 -0
- package/dist/src/bundler/index.d.ts +9 -0
- package/dist/src/bundler/interface.d.ts +15 -0
- package/dist/src/bundler.d.ts +3 -0
- package/dist/src/constants/constants.d.ts +19 -0
- package/dist/src/debug.d.ts +115 -0
- package/dist/src/effects.d.ts +106 -0
- package/dist/src/errors.d.ts +24 -0
- package/dist/src/evaluator/ContextStack.d.ts +65 -0
- package/dist/src/evaluator/effectRef.d.ts +27 -0
- package/dist/src/evaluator/effectTypes.d.ts +79 -0
- package/dist/src/evaluator/frames.d.ts +525 -0
- package/dist/src/evaluator/interface.d.ts +14 -0
- package/dist/src/evaluator/serialization.d.ts +45 -0
- package/dist/src/evaluator/standardEffects.d.ts +35 -0
- package/dist/src/evaluator/step.d.ts +159 -0
- package/dist/src/evaluator/suspension.d.ts +53 -0
- package/dist/src/evaluator/trampoline.d.ts +119 -0
- package/dist/src/full.d.ts +17 -0
- package/dist/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/initReferenceData.d.ts +1 -0
- package/dist/src/interface.d.ts +7 -0
- package/dist/src/modules/assertion.d.ts +2 -0
- package/dist/src/modules/bitwise.d.ts +2 -0
- package/dist/src/modules/collection.d.ts +2 -0
- package/dist/src/modules/convert.d.ts +2 -0
- package/dist/src/modules/functional.d.ts +2 -0
- package/dist/src/modules/grid.d.ts +2 -0
- package/dist/src/modules/linear-algebra.d.ts +2 -0
- package/dist/src/modules/math.d.ts +2 -0
- package/dist/src/modules/matrix.d.ts +2 -0
- package/dist/src/modules/number-theory.d.ts +2 -0
- package/dist/src/modules/random.d.ts +2 -0
- package/dist/src/modules/sequence.d.ts +2 -0
- package/dist/src/modules/string.d.ts +2 -0
- package/dist/src/modules/vector.d.ts +2 -0
- package/dist/src/parser/ParserContext.d.ts +20 -0
- package/dist/src/parser/getPrecedence.d.ts +3 -0
- package/dist/src/parser/helpers.d.ts +19 -0
- package/dist/src/parser/index.d.ts +5 -0
- package/dist/src/parser/subParsers/parseArray.d.ts +3 -0
- package/dist/src/parser/subParsers/parseBindingTarget.d.ts +8 -0
- package/dist/src/parser/subParsers/parseCond.d.ts +4 -0
- package/dist/src/parser/subParsers/parseDo.d.ts +3 -0
- package/dist/src/parser/subParsers/parseExpression.d.ts +5 -0
- package/dist/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
- package/dist/src/parser/subParsers/parseFunction.d.ts +4 -0
- package/dist/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
- package/dist/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
- package/dist/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
- package/dist/src/parser/subParsers/parseLet.d.ts +4 -0
- package/dist/src/parser/subParsers/parseLoop.d.ts +4 -0
- package/dist/src/parser/subParsers/parseMatch.d.ts +4 -0
- package/dist/src/parser/subParsers/parseNumber.d.ts +3 -0
- package/dist/src/parser/subParsers/parseObject.d.ts +3 -0
- package/dist/src/parser/subParsers/parseOperand.d.ts +3 -0
- package/dist/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
- package/dist/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
- package/dist/src/parser/subParsers/parseString.d.ts +4 -0
- package/dist/src/parser/subParsers/parseSymbol.d.ts +3 -0
- package/dist/src/parser/subParsers/parseTry.d.ts +4 -0
- package/dist/src/parser/types.d.ts +129 -0
- package/dist/src/symbolPatterns.d.ts +2 -0
- package/dist/src/testFramework/index.d.ts +15 -0
- package/dist/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/src/tokenizer/operators.d.ts +12 -0
- package/dist/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/src/tokenizer/token.d.ts +84 -0
- package/dist/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/src/tokenizer/tokenizers.d.ts +14 -0
- package/dist/src/transformer/index.d.ts +2 -0
- package/dist/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/src/typeGuards/array.d.ts +9 -0
- package/dist/src/typeGuards/astNode.d.ts +19 -0
- package/dist/src/typeGuards/dvala.d.ts +26 -0
- package/dist/src/typeGuards/dvalaFunction.d.ts +12 -0
- package/dist/src/typeGuards/index.d.ts +7 -0
- package/dist/src/typeGuards/number.d.ts +66 -0
- package/dist/src/typeGuards/string.d.ts +15 -0
- package/dist/src/untokenizer/index.d.ts +2 -0
- package/dist/src/utils/arity.d.ts +10 -0
- package/dist/src/utils/debug/debugTools.d.ts +1 -0
- package/dist/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
- package/dist/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/src/utils/getAssertionError.d.ts +3 -0
- package/dist/src/utils/index.d.ts +14 -0
- package/dist/src/utils/maybePromise.d.ts +54 -0
- package/dist/src/utils/symbols.d.ts +3 -0
- package/dist/testFramework.esm.js +2 -0
- package/dist/testFramework.esm.js.map +1 -0
- package/dist/testFramework.js +2 -0
- package/dist/testFramework.js.map +1 -0
- package/package.json +144 -16
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
|
@@ -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="DvalaError"}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^^",s="^^ef^^";function m(e){return null!==e&&"object"==typeof e&&(i in e&&"functionType"in e&&("string"==typeof(t=e.functionType)&&o.has(t)));var t}function u(e){return!(!Array.isArray(e)||e.length<2)&&("number"==typeof(t=e[0])&&n.has(t));var t}function h(e){return m(e)?`<function ${e.name||"λ"}>`:u(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 c(e,t){return e?.sourceCodeInfo??t}function l(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 p(e,r,n={}){if(!l(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 ${h(e)}.`,c(e,r))}const y=new WeakSet,b=new WeakSet,g=new WeakSet;function f(e,r){if(!function(e){return!(!Array.isArray(e)||!b.has(e)&&(g.has(e)||(e.every(e=>l(e))?(y.add(e),b.add(e),0):(g.add(e),1))))}(e))throw new t(`Expected a vector, but got ${e}`,r)}function d(e,r,n){return new t(`Expected ${e}, got ${h(r)}.`,c(r,n))}function q(e,t){if(!Array.isArray(e))throw d("array",e,t)}function v(e){return null!==e&&"object"==typeof e&&!!e[i]}function k(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof RegExp||v(e)||(t=e,null!==t&&"object"==typeof t&&t[a])||function(e){return null!==e&&"object"==typeof e&&!!e[s]}(e));var t}function w(e){return function(e){return Array.isArray(e)||"string"==typeof e}(e)||k(e)}function x(e,t){if(!function(e){return"number"==typeof e||!!w(e)||!!v(e)}(e))throw d("FunctionLike",e,t)}function A(e){return{min:e,max:e}}const N={"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 T(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 G(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=G(e.slice(n+1),t-1);for(const e of i)r.push([o,...e])}return r}const $={combinations:{evaluate:([e,t],r)=>(q(e,r),p(t,r,{integer:!0,nonNegative:!0,lte:e.length}),0===t?[[]]:G(e,t)),arity:A(2)},"count-combinations":{evaluate:([e,t],r)=>(p(e,r,{integer:!0,nonNegative:!0}),p(t,r,{integer:!0,nonNegative:!0,lte:e}),T(e,t)),arity:A(2)}};const C={derangements:{evaluate:([e],t)=>(q(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:A(1)},"count-derangements":{evaluate:([e],t)=>(p(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:A(1)}};function W(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 M(e){return W(e).sort((e,t)=>e-t)}function S(e){return M(e).slice(0,-1)}const E={divisors:{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),M(e)),arity:A(1)},"count-divisors":{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),W(e).length),arity:A(1)},"proper-divisors":{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),S(e)),arity:A(1)},"count-proper-divisors":{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),W(e).length-1),arity:A(1)}},R=[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,20922789888e3,355687428096e3,6402373705728e3];function I(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 R[e];let t=R[18];for(let r=19;r<=e;r++)t*=r;return t}const j={factorial:{evaluate:([e],t)=>(p(e,t,{integer:!0,nonNegative:!0,lte:170}),I(e)),arity:A(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 D={partitions:{evaluate:([e],t)=>(p(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:A(1)},"count-partitions":{evaluate:([e],r)=>{if(p(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:A(1)}};function P(e){if(0===e.length)return[[]];const t=[];for(let r=0;r<e.length;r++){const n=e[r],o=P([...e.slice(0,r),...e.slice(r+1)]);for(const e of o)t.push([n,...e])}return t}const F={permutations:{evaluate:([e],t)=>(q(e,t),P(e)),arity:A(1)},"count-permutations":{evaluate:([e,t],r)=>(p(e,r,{integer:!0,nonNegative:!0}),p(t,r,{integer:!0,nonNegative:!0,lte:e}),I(e)/I(e-t)),arity:A(2)}};const B={"power-set":{evaluate:([e],t)=>(q(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:A(1)},"count-power-set":{evaluate:([e],t)=>(p(e,t,{integer:!0,nonNegative:!0}),e>=53?1/0:2**e),arity:A(1)}};function L(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 O={"prime-factors":{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),L(e)),arity:A(1)},"distinct-prime-factors":{evaluate:([e],t)=>{p(e,t,{finite:!0,integer:!0,positive:!0});const r=L(e),n=new Set(r);return Array.from(n)},arity:A(1)},"count-prime-factors":{evaluate:([e],t)=>(p(e,t,{finite:!0,integer:!0,positive:!0}),L(e).length),arity:A(1)},"count-distinct-prime-factors":{evaluate:([e],t)=>{p(e,t,{finite:!0,integer:!0,positive:!0});const r=L(e);return new Set(r).size},arity:A(1)}};function _(e,t){return e instanceof Promise?e.then(t):t(e)}function J(e){return S(e).reduce((e,t)=>e+t,0)>e}const X={"abundant-seq":e=>{const t=[];let r=2;for(;t.length<e;)J(r)&&t.push(r),r+=1;return t},"abundant?":e=>J(e),"abundant-take-while":e=>{const t=[];return function r(n){return J(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(2)}};function U(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 Z={"arithmetic-seq":{evaluate:([e,t,r],n)=>(p(e,n,{finite:!0}),p(t,n,{finite:!0}),p(r,n,{integer:!0,positive:!0}),Array.from({length:r},(r,n)=>e+n*t)),arity:A(3)},"arithmetic-take-while":{evaluate:([e,t,r],n,o,{executeFunction:i})=>{p(e,n,{finite:!0}),p(t,n,{finite:!0}),x(r,n);const a=e,s=t,m=r,u=[];return function e(t){const r=a+t*s;return _(i(m,[r,t],o,n),n=>n?(u.push(r),e(t+1)):u)}(0)},arity:A(3)},"arithmetic-nth":{evaluate:([e,t,r],n)=>(p(e,n,{finite:!0}),p(t,n,{finite:!0}),p(r,n,{integer:!0,positive:!0}),e+(r-1)*t),arity:A(3)},"arithmetic?":{evaluate:([e,t,r],n)=>(p(r,n),p(e,n,{finite:!0}),p(t,n,{finite:!0}),function(e,t,r){if(0===t)return U(r,e);const n=(r-e)/t;if(n<0)return!1;const o=Math.round(n),i=e+t*o;return U(n,o)&&U(i,r)}(e,t,r)),arity:A(3)}};function H(e){const t=[1];for(let r=1;r<e;r+=1){let e=0;for(let n=0;n<r;n+=1)e+=T(r+1,n)*t[n];t[r]=r>1&&r%2==1?0:-e/(r+1)}return t}const K={"bernoulli-seq":{evaluate:([e],t)=>(p(e,t,{integer:!0,positive:!0}),H(e)),arity:A(1)},"bernoulli-nth":{evaluate:([e],t)=>{p(e,t,{integer:!0,positive:!0});return H(e)[e-1]},arity:A(1)},"bernoulli-take-while":{evaluate:([e],t,r,{executeFunction:n})=>{x(e,t);const o=e;return function(e){const t=[1];return function r(n){let o=0;for(let e=0;e<n;e++)o+=T(n+1,e)*t[e];const i=n>1&&n%2==1?0:-o/(n+1);return _(e(i,n),e=>e?(t.push(i),r(n+1)):t)}(1)}((e,t)=>_(n(o,[e,t],r),e=>!!e))},arity:A(1)}};function Q(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 V={"prime-seq":e=>{const t=[];let r=2;for(;t.length<e;)Q(r)&&t.push(r),r+=1;return t},"prime?":e=>Q(e),"prime-take-while":e=>{const t=[];return function r(n){return Q(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(2)}};function Y(e){return!(e<=1)&&!Q(e)}const ee={"composite-seq":e=>{const t=[];let r=2;for(;t.length<e;)Y(r)&&t.push(r),r+=1;return t},"composite?":e=>Y(e),"composite-take-while":e=>{const t=[];return function r(n){return Y(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(4)}};function te(e){return S(e).reduce((e,t)=>e+t,0)<e}const re={"deficient-seq":e=>{const t=[];let r=1;for(;t.length<e;)te(r)&&t.push(r),r+=1;return t},"deficient?":e=>te(e),"deficient-take-while":e=>{const t=[];return function r(n){return te(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(1)}};const ne={"geometric-seq":{evaluate:([e,t,r],n)=>(p(e,n,{finite:!0}),p(t,n,{finite:!0}),p(r,n,{integer:!0,positive:!0}),Array.from({length:r},(r,n)=>e*t**n)),arity:A(3)},"geometric-take-while":{evaluate:([e,t,r],n,o,{executeFunction:i})=>{p(e,n,{finite:!0}),p(t,n,{finite:!0}),x(r,n);const a=e,s=t,m=r,u=[];return function e(t){const r=a*s**t;return _(i(m,[r,t],o,n),n=>n?(u.push(r),e(t+1)):u)}(0)},arity:A(3)},"geometric-nth":{evaluate:([e,t,r],n)=>(p(e,n,{finite:!0}),p(t,n,{finite:!0}),p(r,n,{integer:!0,positive:!0}),e*t**(r-1)),arity:A(3)},"geometric?":{evaluate:([e,t,r],n)=>(p(r,n),p(e,n,{finite:!0}),p(t,n,{finite:!0}),function(e,t,r){if(U(e,0))return U(r,0);if(U(t,1))return U(r,e);if(U(t,0))return U(r,0)||U(r,e);if(U(r,e))return!0;if(U(t,-1))return U(r,e)||U(r,-e);if(t<0){const n=Math.log(Math.abs(r/e))/Math.log(Math.abs(t)),o=Math.round(n);if(!U(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!(!U(o,n)||o<0)&&U(e*t**o,r)}(e,t,r)),arity:A(3)}};const oe={"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){const t=[0,1];return _(e(1,0),r=>r?function r(n){const o=1+t[n-t[t[n-1]]];return _(e(o,n-1),e=>e?(t.push(o),r(n+1)):t.slice(1))}(2):[])}(e)};function ie(e){if(e<=0)return!1;const t=new Set;for(;1!==e&&!t.has(e);)t.add(e),e=ae(e);return 1===e}function ae(e){let t=0;for(;e>0;){const r=e%10;t+=r*r,e=Math.floor(e/10)}return t}const se={"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=>ie(e),"happy-take-while":e=>{const t=[];return function r(n){return ie(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(1)}},me={"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 ue(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 he={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=>{const t=[];return _(e("1",0),r=>{if(!r)return t;return t.push("1"),function r(n){const o=t[n-1].replace(/(\d)\1*/g,e=>`${e.length}${e[0]}`);return _(e(o,n),e=>e?(t.push(o),r(n+1)):t)}(1)})},"look-and-say?":e=>function(e){let t="1";if(t===e)return!0;for(;;){if(t=ue(t),t===e)return!0;if(t.length>e.length)return!1}}(e)};function ce(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;return _(e(1,0),t=>{if(!t)return[];let i=1;return function t(){const a=r[i];return _(e(a,o),e=>{if(!e)return n;n.push(a),o++;const s=a,m=[];for(let e=0;e<r.length;e++)(e+1)%s!==0&&m.push(r[e]);if(r=m,i++,i>=r.length-5){let e=r[r.length-1]+2;for(;r.length<i+1e3;)r.push(e),e+=2}return t()})}()})}const le={"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=>ce(t=>t<=e).includes(e),"lucky-take-while":e=>ce(e)};const pe={"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=[];return _(e(1,0),r=>r?(t.push(1),_(e(1,1),r=>r?(t.push(1),_(e(1,2),r=>{if(!r)return t;t.push(1);let n=1,o=1,i=1;return function r(a){const s=n+o;return n=o,o=i,i=s,_(e(i,a),e=>e?(t.push(i),r(a+1)):t)}(4)})):t)):t)}},ye={"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=[];return function r(n){const o=n**3;return _(e(o,n),e=>e?(t.push(o),r(n+1)):t)}(1)}};function be(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(U(n**r,e))return[n,r]}return null}const ge={"perfect-power-seq":e=>{const t=[];for(let r=1;t.length<e;r++)be(r)&&t.push(r);return t},"perfect-power?":e=>null!==be(e),"perfect-power-take-while":e=>{const t=[];return function r(n){return be(n)?_(e(n,t.length),e=>e?(t.push(n),r(n+1)):t):r(n+1)}(1)}},fe={"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=[];return function r(n){const o=n**2;return _(e(o,n),e=>e?(t.push(o),r(n+1)):t)}(1)}},de={"polygonal-seq":{evaluate:([e,t],r)=>{p(e,r,{integer:!0,gte:3}),p(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:A(2)},"polygonal-take-while":{evaluate:([e,t],r,n,{executeFunction:o})=>{p(e,r,{integer:!0,gte:3}),x(t,r);const i=e,a=t,s=[];return function e(t){const m=(t*t*(i-2)-t*(i-4))/2;return _(o(a,[m,t],n,r),r=>r?(s.push(m),e(t+1)):s)}(1)},arity:A(2)},"polygonal-nth":{evaluate:([e,t],r)=>(p(e,r,{integer:!0,gte:3}),p(t,r,{integer:!0,positive:!0}),(t*t*(e-2)-t*(e-4))/2),arity:A(2)},"polygonal?":{evaluate:([e,t],r)=>{if(p(t,r,{integer:!0}),p(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:A(2)}};const qe={"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=>{const t=[],r=new Set([0]);return _(e(0,0),n=>{if(!n)return t;return t.push(0),function n(o){let i=t[o-1]-o;return(i<=0||r.has(i))&&(i=t[o-1]+o),_(e(i,o),e=>e?(t.push(i),r.add(i),n(o+1)):t)}(1)})},"recaman?":()=>!0},ve={"thue-morse-seq":e=>{const t=[];for(let r=0;r<e;r+=1)t[r]=ke(r)%2;return t},"thue-morse-take-while":e=>{const t=[];return function r(n){const o=ke(n)%2;return _(e(o,n),e=>e?(t.push(o),r(n+1)):t)}(0)},"thue-morse?":e=>1===e||0===e};function ke(e){let t=0;for(;e;)t+=1&e,e>>=1;return t}const we={};function xe(e){for(const[t,r]of Object.entries(e)){if(we[t])throw new Error(`Duplicate normal expression key found: ${t}`);we[t]=r}}function Ae(e,t){return{[`${e}-seq`]:Te(e=>t.slice(0,e),t.length),[`${e}-take-while`]:Ge(e=>function r(n){return n>=t.length?t.slice(0,n):_(e(t[n],n),e=>e?r(n+1):t.slice(0,n))}(0),t.length),[`${e}-nth`]:$e(()=>t,t.length),[`${e}?`]:Ce(e=>t.includes(e))}}function Ne(e){for(const[t,r]of Object.entries(e)){if(we[t])throw new Error(`Duplicate normal expression key found: ${t}`);t.endsWith("seq")?(we[t]=Te(r,e.maxLength),e.noNth||(we[t.replace(/seq$/,"nth")]=$e(r,e.maxLength))):t.endsWith("take-while")?we[t]=Ge(r,e.maxLength):t.endsWith("?")&&(e.string?we[t]=We(r):we[t]=Ce(r))}}function Te(e,r){return{evaluate:(n,o)=>{const i=n[0]??r;p(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}:A(1)}}function Ge(e,r){return{evaluate:(r,n,o,{executeFunction:i})=>{const a=r[0];x(a,n);const s=e((e,t)=>_(i(a,[e,t],o),e=>!!e),n);return _(s,e=>{if("number"==typeof e[0]&&e.some(e=>e>Number.MAX_SAFE_INTEGER))throw new t("Result exceeds maximum safe integer",n);return e})},arity:"number"==typeof r?{max:1}:A(1)}}function $e(e,r){return{evaluate:(n,o)=>{const i=n[0];p(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:A(1)}}function Ce(e){return{evaluate:(t,r)=>{const n=t[0];return p(n,r),e(n,r)},arity:A(1)}}function We(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 d(r.nonEmpty?"non empty string":r.char?"character":"string",e,t)}(n,r),e(n,r)},arity:A(1)}}function Me(e,t){for(;0!==t;){const r=t;t=e%t,e=r}return Math.abs(e)}function Se(e,t){return Math.floor(e*t/Me(e,t))}function Ee(e){if(1===e)return 1;const t=L(e);return new Set(t).size!==t.length?0:t.length%2==0?1:-1}function Re(e,t){if(0===t)return[e,1,0];const[r,n,o]=Re(t,e%t);return[r,o,n-Math.floor(e/t)*o]}function Ie(e,t){const[r,n]=Re(e,t);if(1!==r)throw new Error(`Modular inverse does not exist (gcd(${e}, ${t}) = ${r})`);return(n%t+t)%t}Ne(X),Ne({"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}),Ne(ee),Ne(re),Ne(oe),Ne(se),Ne(me),Ne(he),Ne(le),Ne(pe),Ne(fe),Ne(ye),Ne(ge),Ne(V),Ne(qe),Ne(ve),xe(Ae("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])),xe(Ae("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])),xe(Ae("factorial",R)),xe(Ae("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])),xe(Ae("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])),xe(Ae("mersenne",[3,7,31,127,2047,8191,131071,524287,2147483647])),xe(Ae("partition",z)),xe(Ae("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])),xe(Ae("perfect",[6,28,496,8128,33550336,8589869056,137438691328])),xe(Ae("sylvester",[2,6,42,1806,3263442,0x9afa8dc8416])),xe(Ae("bell",[1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,27644437,190899322,1382958545,10480142147,82864869804,682076806159,5832742205057,51724158235372,474869816156751,4506715738447323])),xe(Z),xe(K),xe(ne),xe(de);const je={"coprime?":{evaluate:([e,t],r)=>(p(e,r,{integer:!0}),p(t,r,{integer:!0}),1===Me(e,t)),arity:A(2)},"divisible-by?":{evaluate:([e,t],r)=>(p(e,r,{integer:!0}),p(t,r,{integer:!0}),0!==t&&e%t===0),arity:A(2)},gcd:{evaluate:([e,t],r)=>(p(e,r),p(t,r),Me(e,t)),arity:A(2)},lcm:{evaluate:([e,t],r)=>(p(e,r),p(t,r),Se(e,t)),arity:A(2)},multinomial:{evaluate:([...e],t)=>{f(e,t);return I(e.reduce((e,r)=>(p(r,t,{integer:!0,nonNegative:!0}),e+r),0))/e.reduce((e,t)=>e*I(t),1)},arity:{min:1}},"amicable?":{evaluate:([e,t],r)=>{p(e,r,{integer:!0,positive:!0}),p(t,r,{integer:!0,positive:!0});const n=S(e).reduce((e,t)=>e+t,0),o=S(t).reduce((e,t)=>e+t,0);return n===t&&o===e&&e!==t},arity:A(2)},"euler-totient":{evaluate:([e],t)=>{p(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:A(1)},mobius:{evaluate:([e],t)=>{if(p(e,t,{integer:!0,positive:!0}),1===e)return 1;const r=L(e);return new Set(r).size!==r.length?0:r.length%2==0?1:-1},arity:A(1)},mertens:{evaluate:([e],t)=>{if(p(e,t,{integer:!0,positive:!0}),1===e)return 1;let r=0;for(let t=1;t<=e;t++){r+=Ee(t)}return r},arity:A(1)},sigma:{evaluate:([e],t)=>(p(e,t,{integer:!0,positive:!0}),M(e).reduce((e,t)=>e+t,0)),arity:A(1)},"carmichael-lambda":{evaluate:([e],t)=>{if(p(e,t,{integer:!0,positive:!0}),1===e)return 1;const r=L(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)=>Se(e,t),1)},arity:A(1)},"cartesian-product":{evaluate:(e,t)=>{e.forEach(e=>{q(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)=>{p(e,t,{integer:!0,positive:!0});return be(e)||null},arity:A(1)},"mod-exp":{evaluate:([e,t,r],n)=>(p(e,n,{finite:!0}),p(t,n,{integer:!0,positive:!0}),p(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:A(3)},"mod-inv":{evaluate:([e,r],n)=>{p(e,n,{integer:!0,positive:!0}),p(r,n,{integer:!0,positive:!0});try{return Ie(e,r)}catch(e){throw new t(e,n)}},arity:A(2)},"extended-gcd":{evaluate:([e,t],r)=>(p(e,r,{integer:!0}),p(t,r,{integer:!0}),Re(e,t)),arity:A(2)},"chinese-remainder":{evaluate:([e,r],n)=>{if(f(e,n),f(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=Re(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*Ie(s,a))%r}return n}(e,r)}catch(e){throw new t(e.message,n)}},arity:A(2)},"stirling-first":{evaluate:([e,t],r)=>{p(e,r,{integer:!0,positive:!0}),p(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:A(2)},"stirling-second":{evaluate:([e,t],r)=>{if(p(e,r,{integer:!0,positive:!0}),p(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:A(2)}};function ze(e){for(const[t,r]of Object.entries(e)){if(je[t])throw new Error(`Duplicate normal expression key found: ${t}`);je[t]=r}}!function(e){for(const[t,r]of Object.entries(e)){if(je[t])throw new Error(`Duplicate normal expression key found: ${t}`);je[t]=r}}(we),ze(j),ze(E),ze($),ze(F),ze(D),ze(O),ze(C),ze(B);for(const[e,t]of Object.entries(N))je[e]&&(je[e].docs=t);const De={name:"number-theory",functions:je};exports.numberTheoryModule=De;
|
|
2
|
+
//# sourceMappingURL=number-theory.js.map
|