@mojir/lits 2.2.2-alpha.6 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (977) hide show
  1. package/README.md +1556 -107
  2. package/dist/cli/cli/src/cli.d.ts +1 -1
  3. package/dist/cli/cli/src/cliDocumentation/getCliType.d.ts +1 -1
  4. package/dist/cli/cli/src/colorizer.d.ts +36 -36
  5. package/dist/cli/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  6. package/dist/cli/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  7. package/dist/cli/cli/src/js-interop/Cli/index.d.ts +3 -0
  8. package/dist/cli/cli/src/js-interop/utils.d.ts +2 -0
  9. package/dist/cli/cli.js +30664 -12848
  10. package/dist/cli/reference/api.d.ts +53 -41
  11. package/dist/cli/reference/index.d.ts +150 -23
  12. package/dist/cli/src/AutoCompleter/AutoCompleter.d.ts +25 -0
  13. package/dist/cli/src/Lits/Cache.d.ts +1 -1
  14. package/dist/cli/src/Lits/Lits.d.ts +26 -22
  15. package/dist/cli/src/allModules.d.ts +2 -0
  16. package/dist/cli/src/builtin/bindingNode.d.ts +5 -0
  17. package/dist/cli/src/builtin/{normalExpressions/categories → core}/array.d.ts +1 -1
  18. package/dist/cli/src/builtin/{normalExpressions/categories → core}/bitwise.d.ts +1 -1
  19. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/collection.d.ts +1 -1
  20. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/functional.d.ts +1 -1
  21. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/math.d.ts +1 -1
  22. package/dist/cli/src/builtin/core/meta.d.ts +3 -0
  23. package/dist/cli/src/builtin/{normalExpressions/categories → core}/misc.d.ts +1 -1
  24. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/object.d.ts +1 -1
  25. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/predicates.d.ts +1 -1
  26. package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/regexp.d.ts +1 -1
  27. package/dist/cli/src/builtin/core/sequence.d.ts +2 -0
  28. package/dist/cli/src/builtin/{normalExpressions/categories → core}/string.d.ts +1 -1
  29. package/dist/cli/src/builtin/core/vector.d.ts +2 -0
  30. package/dist/cli/src/builtin/index.d.ts +9 -34
  31. package/dist/cli/src/builtin/interface.d.ts +91 -24
  32. package/dist/cli/src/builtin/modules/assert/docs.d.ts +2 -0
  33. package/dist/cli/src/builtin/modules/assert/index.d.ts +2 -0
  34. package/dist/cli/src/builtin/modules/bitwise/index.d.ts +2 -0
  35. package/dist/cli/src/builtin/modules/collection/index.d.ts +2 -0
  36. package/dist/cli/src/builtin/modules/functional/index.d.ts +2 -0
  37. package/dist/cli/src/builtin/modules/grid/docs.d.ts +2 -0
  38. package/dist/cli/src/builtin/modules/grid/fromArray.d.ts +8 -0
  39. package/dist/cli/src/builtin/modules/grid/index.d.ts +2 -0
  40. package/dist/cli/src/builtin/modules/grid/transpose.d.ts +2 -0
  41. package/dist/cli/src/builtin/modules/interface.d.ts +11 -0
  42. package/dist/cli/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  43. package/dist/cli/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  44. package/dist/cli/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  45. package/dist/cli/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  46. package/dist/cli/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  47. package/dist/cli/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  48. package/dist/cli/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  49. package/dist/cli/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  50. package/dist/cli/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  51. package/dist/cli/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  52. package/dist/cli/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  53. package/dist/cli/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  54. package/dist/cli/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  55. package/dist/cli/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  56. package/dist/cli/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  57. package/dist/cli/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  58. package/dist/cli/src/builtin/modules/math/index.d.ts +2 -0
  59. package/dist/cli/src/builtin/modules/matrix/docs.d.ts +2 -0
  60. package/dist/cli/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  61. package/dist/cli/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  62. package/dist/cli/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  63. package/dist/cli/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  64. package/dist/cli/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  65. package/dist/cli/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  66. package/dist/cli/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  67. package/dist/cli/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  68. package/dist/cli/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  69. package/dist/cli/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  70. package/dist/cli/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  71. package/dist/cli/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  72. package/dist/cli/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  73. package/dist/cli/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  74. package/dist/cli/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  75. package/dist/cli/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  76. package/dist/cli/src/builtin/modules/matrix/index.d.ts +4 -0
  77. package/dist/cli/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  78. package/dist/cli/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  79. package/dist/cli/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  80. package/dist/cli/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  81. package/dist/cli/src/builtin/modules/number-theory/docs.d.ts +2 -0
  82. package/dist/cli/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  83. package/dist/cli/src/builtin/modules/number-theory/index.d.ts +4 -0
  84. package/dist/cli/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  85. package/dist/cli/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  86. package/dist/cli/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  87. package/dist/cli/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  88. package/dist/cli/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  89. package/dist/cli/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  90. package/dist/cli/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  91. package/dist/cli/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  92. package/dist/cli/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  93. package/dist/cli/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  94. package/dist/cli/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  95. package/dist/cli/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  96. package/dist/cli/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  97. package/dist/cli/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  98. package/dist/cli/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  99. package/dist/cli/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  100. package/dist/cli/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  101. package/dist/cli/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  102. package/dist/cli/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  103. package/dist/cli/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  104. package/dist/cli/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  105. package/dist/cli/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  106. package/dist/cli/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  107. package/dist/cli/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  108. package/dist/cli/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  109. package/dist/cli/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  110. package/dist/cli/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  111. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  112. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  113. package/dist/cli/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  114. package/dist/cli/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  115. package/dist/cli/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  116. package/dist/cli/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  117. package/dist/cli/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  118. package/dist/cli/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  119. package/dist/cli/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  120. package/dist/cli/src/builtin/modules/random/docs.d.ts +2 -0
  121. package/dist/cli/src/builtin/modules/random/index.d.ts +2 -0
  122. package/dist/cli/src/builtin/modules/sequence/index.d.ts +2 -0
  123. package/dist/cli/src/builtin/modules/string/index.d.ts +2 -0
  124. package/dist/cli/src/builtin/modules/vector/bincount.d.ts +9 -0
  125. package/dist/cli/src/builtin/modules/vector/calcMad.d.ts +1 -0
  126. package/dist/cli/src/builtin/modules/vector/calcMean.d.ts +1 -0
  127. package/dist/cli/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  128. package/dist/cli/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  129. package/dist/cli/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  130. package/dist/cli/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  131. package/dist/cli/src/builtin/modules/vector/docs.d.ts +2 -0
  132. package/dist/cli/src/builtin/modules/vector/entropy.d.ts +8 -0
  133. package/dist/cli/src/builtin/modules/vector/histogram.d.ts +9 -0
  134. package/dist/cli/src/builtin/modules/vector/index.d.ts +2 -0
  135. package/dist/cli/src/builtin/modules/vector/mode.d.ts +6 -0
  136. package/dist/cli/src/builtin/modules/vector/outliers.d.ts +7 -0
  137. package/dist/cli/src/builtin/modules/vector/percentile.d.ts +7 -0
  138. package/dist/cli/src/builtin/modules/vector/quartiles.d.ts +1 -0
  139. package/dist/cli/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  140. package/dist/cli/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  141. package/dist/cli/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  142. package/dist/cli/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  143. package/dist/cli/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  144. package/dist/cli/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  145. package/dist/cli/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  146. package/dist/cli/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  147. package/dist/cli/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  148. package/dist/cli/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  149. package/dist/cli/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  150. package/dist/cli/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  151. package/dist/cli/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  152. package/dist/cli/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  153. package/dist/cli/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  154. package/dist/cli/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  155. package/dist/cli/src/builtin/normalExpressions/index.d.ts +7 -1
  156. package/dist/cli/src/builtin/specialExpressionTypes.d.ts +22 -0
  157. package/dist/cli/src/builtin/specialExpressions/and.d.ts +3 -3
  158. package/dist/cli/src/builtin/specialExpressions/array.d.ts +6 -0
  159. package/dist/cli/src/builtin/specialExpressions/block.d.ts +6 -0
  160. package/dist/cli/src/builtin/specialExpressions/cond.d.ts +3 -3
  161. package/dist/cli/src/builtin/specialExpressions/def.d.ts +5 -4
  162. package/dist/cli/src/builtin/specialExpressions/defined.d.ts +5 -0
  163. package/dist/cli/src/builtin/specialExpressions/functions.d.ts +5 -17
  164. package/dist/cli/src/builtin/specialExpressions/if.d.ts +3 -3
  165. package/dist/cli/src/builtin/specialExpressions/let.d.ts +3 -7
  166. package/dist/cli/src/builtin/specialExpressions/loop.d.ts +3 -4
  167. package/dist/cli/src/builtin/specialExpressions/loops.d.ts +5 -14
  168. package/dist/cli/src/builtin/specialExpressions/object.d.ts +6 -0
  169. package/dist/cli/src/builtin/specialExpressions/or.d.ts +3 -3
  170. package/dist/cli/src/builtin/specialExpressions/qq.d.ts +3 -3
  171. package/dist/cli/src/builtin/specialExpressions/recur.d.ts +3 -3
  172. package/dist/cli/src/builtin/specialExpressions/switch.d.ts +6 -0
  173. package/dist/cli/src/builtin/specialExpressions/throw.d.ts +3 -3
  174. package/dist/cli/src/builtin/specialExpressions/try.d.ts +3 -5
  175. package/dist/cli/src/builtin/specialExpressions/unless.d.ts +6 -0
  176. package/dist/cli/src/builtin/utils.d.ts +3 -15
  177. package/dist/cli/src/cli.d.ts +1 -1
  178. package/dist/cli/src/cliDocumentation/getCliType.d.ts +1 -1
  179. package/dist/cli/src/colorizer.d.ts +36 -36
  180. package/dist/cli/src/constants/constants.d.ts +18 -44
  181. package/dist/cli/src/errors.d.ts +2 -5
  182. package/dist/cli/src/evaluator/ContextStack.d.ts +16 -11
  183. package/dist/cli/src/evaluator/functionExecutors.d.ts +4 -4
  184. package/dist/cli/src/evaluator/index.d.ts +2 -2
  185. package/dist/cli/src/evaluator/interface.d.ts +7 -6
  186. package/dist/cli/src/getUndefinedSymbols/index.d.ts +7 -0
  187. package/dist/cli/src/index.d.ts +9 -12
  188. package/dist/cli/src/initReferenceData.d.ts +1 -0
  189. package/dist/cli/src/interface.d.ts +1 -2
  190. package/dist/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  191. package/dist/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  192. package/dist/cli/src/js-interop/Cli/index.d.ts +3 -0
  193. package/dist/cli/src/js-interop/utils.d.ts +2 -0
  194. package/dist/cli/src/parser/ParserContext.d.ts +20 -0
  195. package/dist/cli/src/parser/helpers.d.ts +19 -0
  196. package/dist/cli/src/parser/index.d.ts +3 -3
  197. package/dist/cli/src/parser/subParsers/getPrecedence.d.ts +3 -0
  198. package/dist/cli/src/parser/subParsers/parseArray.d.ts +3 -0
  199. package/dist/cli/src/parser/subParsers/parseBindingTarget.d.ts +6 -0
  200. package/dist/cli/src/parser/subParsers/parseCond.d.ts +4 -0
  201. package/dist/cli/src/parser/subParsers/parseDo.d.ts +3 -0
  202. package/dist/cli/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
  203. package/dist/cli/src/parser/subParsers/parseFunction.d.ts +4 -0
  204. package/dist/cli/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
  205. package/dist/cli/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
  206. package/dist/cli/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
  207. package/dist/cli/src/parser/subParsers/parseLet.d.ts +4 -0
  208. package/dist/cli/src/parser/subParsers/parseLoop.d.ts +4 -0
  209. package/dist/cli/src/parser/subParsers/parseNumber.d.ts +3 -0
  210. package/dist/cli/src/parser/subParsers/parseObject.d.ts +3 -0
  211. package/dist/cli/src/parser/subParsers/parseOperand.d.ts +3 -0
  212. package/dist/cli/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
  213. package/dist/cli/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
  214. package/dist/cli/src/parser/subParsers/parseString.d.ts +4 -0
  215. package/dist/cli/src/parser/subParsers/parseSwitch.d.ts +4 -0
  216. package/dist/cli/src/parser/subParsers/parseSymbol.d.ts +3 -0
  217. package/dist/cli/src/parser/subParsers/parseTry.d.ts +4 -0
  218. package/dist/cli/src/parser/types.d.ts +126 -0
  219. package/dist/cli/src/symbolPatterns.d.ts +2 -0
  220. package/dist/cli/src/testFramework/index.d.ts +3 -2
  221. package/dist/cli/src/tokenizer/minifyTokenStream.d.ts +4 -0
  222. package/dist/cli/src/tokenizer/operators.d.ts +12 -0
  223. package/dist/cli/src/tokenizer/reservedNames.d.ts +66 -0
  224. package/dist/cli/src/tokenizer/token.d.ts +84 -0
  225. package/dist/cli/src/tokenizer/tokenize.d.ts +8 -0
  226. package/dist/cli/src/tokenizer/tokenizers.d.ts +14 -19
  227. package/dist/cli/src/transformer/index.d.ts +2 -2
  228. package/dist/cli/src/typeGuards/annotatedArrays.d.ts +16 -0
  229. package/dist/cli/src/typeGuards/array.d.ts +1 -1
  230. package/dist/cli/src/typeGuards/astNode.d.ts +19 -17
  231. package/dist/cli/src/typeGuards/index.d.ts +1 -11
  232. package/dist/cli/src/typeGuards/lits.d.ts +4 -2
  233. package/dist/cli/src/typeGuards/litsFunction.d.ts +3 -3
  234. package/dist/cli/src/typeGuards/number.d.ts +1 -1
  235. package/dist/cli/src/typeGuards/string.d.ts +1 -1
  236. package/dist/cli/src/untokenizer/index.d.ts +1 -1
  237. package/dist/cli/src/utils/arity.d.ts +10 -0
  238. package/dist/cli/src/utils/debug/debugTools.d.ts +0 -2
  239. package/dist/cli/src/utils/debug/getCodeMarker.d.ts +2 -0
  240. package/dist/cli/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
  241. package/dist/cli/src/utils/docString/generateDocString.d.ts +2 -0
  242. package/dist/cli/src/utils/getAssertionError.d.ts +1 -1
  243. package/dist/cli/src/utils/index.d.ts +9 -6
  244. package/dist/full.esm.js +2 -0
  245. package/dist/full.esm.js.map +1 -0
  246. package/dist/full.js +2 -0
  247. package/dist/full.js.map +1 -0
  248. package/dist/index.esm.js +1 -15635
  249. package/dist/index.esm.js.map +1 -1
  250. package/dist/index.js +1 -15663
  251. package/dist/index.js.map +1 -1
  252. package/dist/lits.iife.js +1 -15668
  253. package/dist/lits.iife.js.map +1 -1
  254. package/dist/modules/assert.esm.js +2 -0
  255. package/dist/modules/assert.esm.js.map +1 -0
  256. package/dist/modules/assert.js +2 -0
  257. package/dist/modules/assert.js.map +1 -0
  258. package/dist/modules/bitwise.esm.js +2 -0
  259. package/dist/modules/bitwise.esm.js.map +1 -0
  260. package/dist/modules/bitwise.js +2 -0
  261. package/dist/modules/bitwise.js.map +1 -0
  262. package/dist/modules/cli/src/cli.d.ts +2 -0
  263. package/dist/modules/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
  264. package/dist/modules/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
  265. package/dist/modules/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
  266. package/dist/modules/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
  267. package/dist/modules/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
  268. package/dist/modules/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
  269. package/dist/modules/cli/src/cliDocumentation/getCliType.d.ts +3 -0
  270. package/dist/modules/cli/src/cliFormatterRules.d.ts +13 -0
  271. package/dist/modules/cli/src/colorizer.d.ts +939 -0
  272. package/dist/modules/cli/src/createReadlineInterface.d.ts +5 -0
  273. package/dist/modules/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
  274. package/dist/modules/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
  275. package/dist/modules/cli/src/js-interop/Cli/index.d.ts +3 -0
  276. package/dist/modules/cli/src/js-interop/utils.d.ts +2 -0
  277. package/dist/modules/collection.esm.js +2 -0
  278. package/dist/modules/collection.esm.js.map +1 -0
  279. package/dist/modules/collection.js +2 -0
  280. package/dist/modules/collection.js.map +1 -0
  281. package/dist/modules/common/createFormatter.d.ts +6 -0
  282. package/dist/modules/common/utils.d.ts +2 -0
  283. package/dist/modules/functional.esm.js +2 -0
  284. package/dist/modules/functional.esm.js.map +1 -0
  285. package/dist/modules/functional.js +2 -0
  286. package/dist/modules/functional.js.map +1 -0
  287. package/dist/modules/grid.esm.js +2 -0
  288. package/dist/modules/grid.esm.js.map +1 -0
  289. package/dist/modules/grid.js +2 -0
  290. package/dist/modules/grid.js.map +1 -0
  291. package/dist/modules/linear-algebra.esm.js +2 -0
  292. package/dist/modules/linear-algebra.esm.js.map +1 -0
  293. package/dist/modules/linear-algebra.js +2 -0
  294. package/dist/modules/linear-algebra.js.map +1 -0
  295. package/dist/modules/math.esm.js +2 -0
  296. package/dist/modules/math.esm.js.map +1 -0
  297. package/dist/modules/math.js +2 -0
  298. package/dist/modules/math.js.map +1 -0
  299. package/dist/modules/matrix.esm.js +2 -0
  300. package/dist/modules/matrix.esm.js.map +1 -0
  301. package/dist/modules/matrix.js +2 -0
  302. package/dist/modules/matrix.js.map +1 -0
  303. package/dist/modules/number-theory.esm.js +2 -0
  304. package/dist/modules/number-theory.esm.js.map +1 -0
  305. package/dist/modules/number-theory.js +2 -0
  306. package/dist/modules/number-theory.js.map +1 -0
  307. package/dist/modules/random.esm.js +2 -0
  308. package/dist/modules/random.esm.js.map +1 -0
  309. package/dist/modules/random.js +2 -0
  310. package/dist/modules/random.js.map +1 -0
  311. package/dist/modules/reference/api.d.ts +71 -0
  312. package/dist/modules/reference/datatype.d.ts +3 -0
  313. package/dist/modules/reference/index.d.ts +178 -0
  314. package/dist/modules/reference/shorthand.d.ts +3 -0
  315. package/dist/modules/sequence.esm.js +2 -0
  316. package/dist/modules/sequence.esm.js.map +1 -0
  317. package/dist/modules/sequence.js +2 -0
  318. package/dist/modules/sequence.js.map +1 -0
  319. package/dist/modules/src/AutoCompleter/AutoCompleter.d.ts +25 -0
  320. package/dist/modules/src/Lits/Cache.d.ts +16 -0
  321. package/dist/modules/src/Lits/Lits.d.ts +58 -0
  322. package/dist/modules/src/allModules.d.ts +2 -0
  323. package/dist/modules/src/builtin/bindingNode.d.ts +5 -0
  324. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/array.d.ts +1 -1
  325. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/bitwise.d.ts +1 -1
  326. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/collection.d.ts +1 -1
  327. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/functional.d.ts +1 -1
  328. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/math.d.ts +1 -1
  329. package/dist/modules/src/builtin/core/meta.d.ts +3 -0
  330. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/misc.d.ts +1 -1
  331. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/object.d.ts +1 -1
  332. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/predicates.d.ts +1 -1
  333. package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/regexp.d.ts +1 -1
  334. package/dist/modules/src/builtin/core/sequence.d.ts +2 -0
  335. package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/string.d.ts +1 -1
  336. package/dist/modules/src/builtin/core/vector.d.ts +2 -0
  337. package/dist/modules/src/builtin/index.d.ts +13 -0
  338. package/dist/modules/src/builtin/interface.d.ts +109 -0
  339. package/dist/modules/src/builtin/modules/assert/docs.d.ts +2 -0
  340. package/dist/modules/src/builtin/modules/assert/index.d.ts +2 -0
  341. package/dist/modules/src/builtin/modules/bitwise/index.d.ts +2 -0
  342. package/dist/modules/src/builtin/modules/collection/index.d.ts +2 -0
  343. package/dist/modules/src/builtin/modules/functional/index.d.ts +2 -0
  344. package/dist/modules/src/builtin/modules/grid/docs.d.ts +2 -0
  345. package/dist/modules/src/builtin/modules/grid/fromArray.d.ts +8 -0
  346. package/dist/modules/src/builtin/modules/grid/index.d.ts +2 -0
  347. package/dist/modules/src/builtin/modules/grid/transpose.d.ts +2 -0
  348. package/dist/modules/src/builtin/modules/interface.d.ts +11 -0
  349. package/dist/modules/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  350. package/dist/modules/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  351. package/dist/modules/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  352. package/dist/modules/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  353. package/dist/modules/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  354. package/dist/modules/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  355. package/dist/modules/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  356. package/dist/modules/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  357. package/dist/modules/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  358. package/dist/modules/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  359. package/dist/modules/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  360. package/dist/modules/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  361. package/dist/modules/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  362. package/dist/modules/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  363. package/dist/modules/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  364. package/dist/modules/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  365. package/dist/modules/src/builtin/modules/math/index.d.ts +2 -0
  366. package/dist/modules/src/builtin/modules/matrix/docs.d.ts +2 -0
  367. package/dist/modules/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  368. package/dist/modules/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  369. package/dist/modules/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  370. package/dist/modules/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  371. package/dist/modules/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
  372. package/dist/modules/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  373. package/dist/modules/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  374. package/dist/modules/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  375. package/dist/modules/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  376. package/dist/modules/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  377. package/dist/modules/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  378. package/dist/modules/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  379. package/dist/modules/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  380. package/dist/modules/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  381. package/dist/modules/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  382. package/dist/modules/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  383. package/dist/modules/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  384. package/dist/modules/src/builtin/modules/matrix/index.d.ts +4 -0
  385. package/dist/modules/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  386. package/dist/modules/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  387. package/dist/modules/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  388. package/dist/modules/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  389. package/dist/modules/src/builtin/modules/number-theory/docs.d.ts +2 -0
  390. package/dist/modules/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  391. package/dist/modules/src/builtin/modules/number-theory/index.d.ts +4 -0
  392. package/dist/modules/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  393. package/dist/modules/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  394. package/dist/modules/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  395. package/dist/modules/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  396. package/dist/modules/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  397. package/dist/modules/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  398. package/dist/modules/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  399. package/dist/modules/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  400. package/dist/modules/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  401. package/dist/modules/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  402. package/dist/modules/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  403. package/dist/modules/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  404. package/dist/modules/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  405. package/dist/modules/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  406. package/dist/modules/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  407. package/dist/modules/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  408. package/dist/modules/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  409. package/dist/modules/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  410. package/dist/modules/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  411. package/dist/modules/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  412. package/dist/modules/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  413. package/dist/modules/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  414. package/dist/modules/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  415. package/dist/modules/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  416. package/dist/modules/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  417. package/dist/modules/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  418. package/dist/modules/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  419. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  420. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  421. package/dist/modules/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  422. package/dist/modules/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  423. package/dist/modules/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  424. package/dist/modules/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  425. package/dist/modules/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  426. package/dist/modules/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  427. package/dist/modules/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  428. package/dist/modules/src/builtin/modules/random/docs.d.ts +2 -0
  429. package/dist/modules/src/builtin/modules/random/index.d.ts +2 -0
  430. package/dist/modules/src/builtin/modules/sequence/index.d.ts +2 -0
  431. package/dist/modules/src/builtin/modules/string/index.d.ts +2 -0
  432. package/dist/modules/src/builtin/modules/vector/bincount.d.ts +9 -0
  433. package/dist/modules/src/builtin/modules/vector/calcMad.d.ts +1 -0
  434. package/dist/modules/src/builtin/modules/vector/calcMean.d.ts +1 -0
  435. package/dist/modules/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  436. package/dist/modules/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  437. package/dist/modules/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  438. package/dist/modules/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  439. package/dist/modules/src/builtin/modules/vector/docs.d.ts +2 -0
  440. package/dist/modules/src/builtin/modules/vector/entropy.d.ts +8 -0
  441. package/dist/modules/src/builtin/modules/vector/histogram.d.ts +9 -0
  442. package/dist/modules/src/builtin/modules/vector/index.d.ts +2 -0
  443. package/dist/modules/src/builtin/modules/vector/mode.d.ts +6 -0
  444. package/dist/modules/src/builtin/modules/vector/outliers.d.ts +7 -0
  445. package/dist/modules/src/builtin/modules/vector/percentile.d.ts +7 -0
  446. package/dist/modules/src/builtin/modules/vector/quartiles.d.ts +1 -0
  447. package/dist/modules/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  448. package/dist/modules/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  449. package/dist/modules/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  450. package/dist/modules/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  451. package/dist/modules/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  452. package/dist/modules/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  453. package/dist/modules/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  454. package/dist/modules/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  455. package/dist/modules/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  456. package/dist/modules/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  457. package/dist/modules/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  458. package/dist/modules/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  459. package/dist/modules/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  460. package/dist/modules/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  461. package/dist/modules/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  462. package/dist/modules/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  463. package/dist/modules/src/builtin/normalExpressions/index.d.ts +8 -0
  464. package/dist/modules/src/builtin/specialExpressionTypes.d.ts +22 -0
  465. package/dist/modules/src/builtin/specialExpressions/and.d.ts +6 -0
  466. package/dist/modules/src/builtin/specialExpressions/array.d.ts +6 -0
  467. package/dist/modules/src/builtin/specialExpressions/block.d.ts +6 -0
  468. package/dist/modules/src/builtin/specialExpressions/cond.d.ts +6 -0
  469. package/dist/modules/src/builtin/specialExpressions/def.d.ts +6 -0
  470. package/dist/modules/src/builtin/specialExpressions/defined.d.ts +5 -0
  471. package/dist/modules/src/builtin/specialExpressions/functions.d.ts +6 -0
  472. package/dist/modules/src/builtin/specialExpressions/if.d.ts +6 -0
  473. package/dist/modules/src/builtin/specialExpressions/let.d.ts +6 -0
  474. package/dist/modules/src/builtin/specialExpressions/loop.d.ts +6 -0
  475. package/dist/modules/src/builtin/specialExpressions/loops.d.ts +9 -0
  476. package/dist/modules/src/builtin/specialExpressions/object.d.ts +6 -0
  477. package/dist/modules/src/builtin/specialExpressions/or.d.ts +6 -0
  478. package/dist/modules/src/builtin/specialExpressions/qq.d.ts +6 -0
  479. package/dist/modules/src/builtin/specialExpressions/recur.d.ts +5 -0
  480. package/dist/modules/src/builtin/specialExpressions/switch.d.ts +6 -0
  481. package/dist/modules/src/builtin/specialExpressions/throw.d.ts +5 -0
  482. package/dist/modules/src/builtin/specialExpressions/try.d.ts +6 -0
  483. package/dist/modules/src/builtin/specialExpressions/unless.d.ts +6 -0
  484. package/dist/modules/src/builtin/utils.d.ts +6 -0
  485. package/dist/modules/src/constants/constants.d.ts +19 -0
  486. package/dist/modules/src/errors.d.ts +24 -0
  487. package/dist/modules/src/evaluator/ContextStack.d.ts +29 -0
  488. package/dist/modules/src/evaluator/functionExecutors.d.ts +11 -0
  489. package/dist/modules/src/evaluator/index.d.ts +5 -0
  490. package/dist/modules/src/evaluator/interface.d.ts +13 -0
  491. package/dist/modules/src/full.d.ts +17 -0
  492. package/dist/modules/src/getUndefinedSymbols/index.d.ts +7 -0
  493. package/dist/modules/src/index.d.ts +14 -0
  494. package/dist/modules/src/initReferenceData.d.ts +1 -0
  495. package/dist/modules/src/interface.d.ts +7 -0
  496. package/dist/modules/src/modules/assert.d.ts +2 -0
  497. package/dist/modules/src/modules/bitwise.d.ts +2 -0
  498. package/dist/modules/src/modules/collection.d.ts +2 -0
  499. package/dist/modules/src/modules/functional.d.ts +2 -0
  500. package/dist/modules/src/modules/grid.d.ts +2 -0
  501. package/dist/modules/src/modules/linear-algebra.d.ts +2 -0
  502. package/dist/modules/src/modules/math.d.ts +2 -0
  503. package/dist/modules/src/modules/matrix.d.ts +2 -0
  504. package/dist/modules/src/modules/number-theory.d.ts +2 -0
  505. package/dist/modules/src/modules/random.d.ts +2 -0
  506. package/dist/modules/src/modules/sequence.d.ts +2 -0
  507. package/dist/modules/src/modules/string.d.ts +2 -0
  508. package/dist/modules/src/modules/vector.d.ts +2 -0
  509. package/dist/modules/src/parser/ParserContext.d.ts +20 -0
  510. package/dist/modules/src/parser/helpers.d.ts +19 -0
  511. package/dist/modules/src/parser/index.d.ts +3 -0
  512. package/dist/modules/src/parser/subParsers/getPrecedence.d.ts +3 -0
  513. package/dist/modules/src/parser/subParsers/parseArray.d.ts +3 -0
  514. package/dist/modules/src/parser/subParsers/parseBindingTarget.d.ts +6 -0
  515. package/dist/modules/src/parser/subParsers/parseCond.d.ts +4 -0
  516. package/dist/modules/src/parser/subParsers/parseDo.d.ts +3 -0
  517. package/dist/modules/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
  518. package/dist/modules/src/parser/subParsers/parseFunction.d.ts +4 -0
  519. package/dist/modules/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
  520. package/dist/modules/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
  521. package/dist/modules/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
  522. package/dist/modules/src/parser/subParsers/parseLet.d.ts +4 -0
  523. package/dist/modules/src/parser/subParsers/parseLoop.d.ts +4 -0
  524. package/dist/modules/src/parser/subParsers/parseNumber.d.ts +3 -0
  525. package/dist/modules/src/parser/subParsers/parseObject.d.ts +3 -0
  526. package/dist/modules/src/parser/subParsers/parseOperand.d.ts +3 -0
  527. package/dist/modules/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
  528. package/dist/modules/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
  529. package/dist/modules/src/parser/subParsers/parseString.d.ts +4 -0
  530. package/dist/modules/src/parser/subParsers/parseSwitch.d.ts +4 -0
  531. package/dist/modules/src/parser/subParsers/parseSymbol.d.ts +3 -0
  532. package/dist/modules/src/parser/subParsers/parseTry.d.ts +4 -0
  533. package/dist/modules/src/parser/types.d.ts +126 -0
  534. package/dist/modules/src/symbolPatterns.d.ts +2 -0
  535. package/dist/modules/src/testFramework/index.d.ts +15 -0
  536. package/dist/modules/src/tokenizer/minifyTokenStream.d.ts +4 -0
  537. package/dist/modules/src/tokenizer/operators.d.ts +12 -0
  538. package/dist/modules/src/tokenizer/reservedNames.d.ts +66 -0
  539. package/dist/modules/src/tokenizer/token.d.ts +84 -0
  540. package/dist/modules/src/tokenizer/tokenize.d.ts +8 -0
  541. package/dist/modules/src/tokenizer/tokenizers.d.ts +14 -0
  542. package/dist/modules/src/transformer/index.d.ts +2 -0
  543. package/dist/modules/src/typeGuards/annotatedArrays.d.ts +16 -0
  544. package/dist/modules/src/typeGuards/array.d.ts +9 -0
  545. package/dist/modules/src/typeGuards/astNode.d.ts +19 -0
  546. package/dist/modules/src/typeGuards/index.d.ts +7 -0
  547. package/dist/modules/src/typeGuards/lits.d.ts +23 -0
  548. package/dist/modules/src/typeGuards/litsFunction.d.ts +12 -0
  549. package/dist/modules/src/typeGuards/number.d.ts +66 -0
  550. package/dist/modules/src/typeGuards/string.d.ts +15 -0
  551. package/dist/modules/src/untokenizer/index.d.ts +2 -0
  552. package/dist/modules/src/utils/arity.d.ts +10 -0
  553. package/dist/modules/src/utils/debug/debugTools.d.ts +1 -0
  554. package/dist/modules/src/utils/debug/getCodeMarker.d.ts +2 -0
  555. package/dist/modules/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
  556. package/dist/modules/src/utils/docString/generateDocString.d.ts +2 -0
  557. package/dist/modules/src/utils/getAssertionError.d.ts +3 -0
  558. package/dist/modules/src/utils/index.d.ts +14 -0
  559. package/dist/modules/src/utils/symbols.d.ts +2 -0
  560. package/dist/modules/string.esm.js +2 -0
  561. package/dist/modules/string.esm.js.map +1 -0
  562. package/dist/modules/string.js +2 -0
  563. package/dist/modules/string.js.map +1 -0
  564. package/dist/modules/vector.esm.js +2 -0
  565. package/dist/modules/vector.esm.js.map +1 -0
  566. package/dist/modules/vector.js +2 -0
  567. package/dist/modules/vector.js.map +1 -0
  568. package/dist/reference/api.d.ts +53 -41
  569. package/dist/reference/index.d.ts +150 -23
  570. package/dist/src/AutoCompleter/AutoCompleter.d.ts +25 -0
  571. package/dist/src/Lits/Cache.d.ts +1 -1
  572. package/dist/src/Lits/Lits.d.ts +26 -22
  573. package/dist/src/allModules.d.ts +2 -0
  574. package/dist/src/builtin/bindingNode.d.ts +5 -0
  575. package/dist/src/builtin/core/array.d.ts +2 -0
  576. package/dist/src/builtin/core/bitwise.d.ts +2 -0
  577. package/dist/src/builtin/core/collection.d.ts +2 -0
  578. package/dist/src/builtin/core/functional.d.ts +2 -0
  579. package/dist/src/builtin/core/math.d.ts +2 -0
  580. package/dist/src/builtin/core/meta.d.ts +3 -0
  581. package/dist/src/builtin/core/misc.d.ts +2 -0
  582. package/dist/src/builtin/core/object.d.ts +2 -0
  583. package/dist/src/builtin/core/predicates.d.ts +2 -0
  584. package/dist/src/builtin/core/regexp.d.ts +2 -0
  585. package/dist/src/builtin/core/sequence.d.ts +2 -0
  586. package/dist/src/builtin/core/string.d.ts +2 -0
  587. package/dist/src/builtin/core/vector.d.ts +2 -0
  588. package/dist/src/builtin/index.d.ts +9 -34
  589. package/dist/src/builtin/interface.d.ts +91 -24
  590. package/dist/src/builtin/modules/assert/docs.d.ts +2 -0
  591. package/dist/src/builtin/modules/assert/index.d.ts +2 -0
  592. package/dist/src/builtin/modules/bitwise/index.d.ts +2 -0
  593. package/dist/src/builtin/modules/collection/index.d.ts +2 -0
  594. package/dist/src/builtin/modules/functional/index.d.ts +2 -0
  595. package/dist/src/builtin/modules/grid/docs.d.ts +2 -0
  596. package/dist/src/builtin/modules/grid/fromArray.d.ts +8 -0
  597. package/dist/src/builtin/modules/grid/index.d.ts +2 -0
  598. package/dist/src/builtin/modules/grid/transpose.d.ts +2 -0
  599. package/dist/src/builtin/modules/interface.d.ts +11 -0
  600. package/dist/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
  601. package/dist/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
  602. package/dist/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
  603. package/dist/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
  604. package/dist/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
  605. package/dist/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
  606. package/dist/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
  607. package/dist/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
  608. package/dist/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
  609. package/dist/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
  610. package/dist/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
  611. package/dist/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
  612. package/dist/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
  613. package/dist/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
  614. package/dist/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
  615. package/dist/src/builtin/modules/linear-algebra/index.d.ts +4 -0
  616. package/dist/src/builtin/modules/math/index.d.ts +2 -0
  617. package/dist/src/builtin/modules/matrix/docs.d.ts +2 -0
  618. package/dist/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
  619. package/dist/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
  620. package/dist/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
  621. package/dist/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
  622. package/dist/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
  623. package/dist/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
  624. package/dist/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
  625. package/dist/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
  626. package/dist/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
  627. package/dist/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
  628. package/dist/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
  629. package/dist/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
  630. package/dist/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
  631. package/dist/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
  632. package/dist/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
  633. package/dist/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
  634. package/dist/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
  635. package/dist/src/builtin/modules/matrix/index.d.ts +4 -0
  636. package/dist/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
  637. package/dist/src/builtin/modules/number-theory/combinations.d.ts +2 -0
  638. package/dist/src/builtin/modules/number-theory/derangements.d.ts +2 -0
  639. package/dist/src/builtin/modules/number-theory/divisors.d.ts +4 -0
  640. package/dist/src/builtin/modules/number-theory/docs.d.ts +2 -0
  641. package/dist/src/builtin/modules/number-theory/factorial.d.ts +3 -0
  642. package/dist/src/builtin/modules/number-theory/index.d.ts +4 -0
  643. package/dist/src/builtin/modules/number-theory/partitions.d.ts +2 -0
  644. package/dist/src/builtin/modules/number-theory/permutations.d.ts +2 -0
  645. package/dist/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
  646. package/dist/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
  647. package/dist/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
  648. package/dist/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
  649. package/dist/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
  650. package/dist/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
  651. package/dist/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
  652. package/dist/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
  653. package/dist/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
  654. package/dist/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
  655. package/dist/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
  656. package/dist/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
  657. package/dist/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
  658. package/dist/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
  659. package/dist/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
  660. package/dist/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
  661. package/dist/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
  662. package/dist/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
  663. package/dist/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
  664. package/dist/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
  665. package/dist/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
  666. package/dist/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
  667. package/dist/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
  668. package/dist/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
  669. package/dist/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
  670. package/dist/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
  671. package/dist/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
  672. package/dist/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
  673. package/dist/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
  674. package/dist/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
  675. package/dist/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
  676. package/dist/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
  677. package/dist/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
  678. package/dist/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
  679. package/dist/src/builtin/modules/random/docs.d.ts +2 -0
  680. package/dist/src/builtin/modules/random/index.d.ts +2 -0
  681. package/dist/src/builtin/modules/sequence/index.d.ts +2 -0
  682. package/dist/src/builtin/modules/string/index.d.ts +2 -0
  683. package/dist/src/builtin/modules/vector/bincount.d.ts +9 -0
  684. package/dist/src/builtin/modules/vector/calcMad.d.ts +1 -0
  685. package/dist/src/builtin/modules/vector/calcMean.d.ts +1 -0
  686. package/dist/src/builtin/modules/vector/calcMedad.d.ts +1 -0
  687. package/dist/src/builtin/modules/vector/calcMedian.d.ts +1 -0
  688. package/dist/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
  689. package/dist/src/builtin/modules/vector/calcVariance.d.ts +2 -0
  690. package/dist/src/builtin/modules/vector/docs.d.ts +2 -0
  691. package/dist/src/builtin/modules/vector/entropy.d.ts +8 -0
  692. package/dist/src/builtin/modules/vector/histogram.d.ts +9 -0
  693. package/dist/src/builtin/modules/vector/index.d.ts +2 -0
  694. package/dist/src/builtin/modules/vector/mode.d.ts +6 -0
  695. package/dist/src/builtin/modules/vector/outliers.d.ts +7 -0
  696. package/dist/src/builtin/modules/vector/percentile.d.ts +7 -0
  697. package/dist/src/builtin/modules/vector/quartiles.d.ts +1 -0
  698. package/dist/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
  699. package/dist/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
  700. package/dist/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
  701. package/dist/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
  702. package/dist/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
  703. package/dist/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
  704. package/dist/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
  705. package/dist/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
  706. package/dist/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
  707. package/dist/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
  708. package/dist/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
  709. package/dist/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
  710. package/dist/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
  711. package/dist/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
  712. package/dist/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
  713. package/dist/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
  714. package/dist/src/builtin/normalExpressions/index.d.ts +7 -1
  715. package/dist/src/builtin/specialExpressionTypes.d.ts +22 -0
  716. package/dist/src/builtin/specialExpressions/and.d.ts +3 -3
  717. package/dist/src/builtin/specialExpressions/array.d.ts +6 -0
  718. package/dist/src/builtin/specialExpressions/block.d.ts +6 -0
  719. package/dist/src/builtin/specialExpressions/cond.d.ts +3 -3
  720. package/dist/src/builtin/specialExpressions/def.d.ts +5 -4
  721. package/dist/src/builtin/specialExpressions/defined.d.ts +5 -0
  722. package/dist/src/builtin/specialExpressions/functions.d.ts +5 -17
  723. package/dist/src/builtin/specialExpressions/if.d.ts +3 -3
  724. package/dist/src/builtin/specialExpressions/let.d.ts +3 -7
  725. package/dist/src/builtin/specialExpressions/loop.d.ts +3 -4
  726. package/dist/src/builtin/specialExpressions/loops.d.ts +5 -14
  727. package/dist/src/builtin/specialExpressions/object.d.ts +6 -0
  728. package/dist/src/builtin/specialExpressions/or.d.ts +3 -3
  729. package/dist/src/builtin/specialExpressions/qq.d.ts +3 -3
  730. package/dist/src/builtin/specialExpressions/recur.d.ts +3 -3
  731. package/dist/src/builtin/specialExpressions/switch.d.ts +6 -0
  732. package/dist/src/builtin/specialExpressions/throw.d.ts +3 -3
  733. package/dist/src/builtin/specialExpressions/try.d.ts +3 -5
  734. package/dist/src/builtin/specialExpressions/unless.d.ts +6 -0
  735. package/dist/src/builtin/utils.d.ts +3 -15
  736. package/dist/src/constants/constants.d.ts +18 -44
  737. package/dist/src/errors.d.ts +2 -5
  738. package/dist/src/evaluator/ContextStack.d.ts +16 -11
  739. package/dist/src/evaluator/functionExecutors.d.ts +4 -4
  740. package/dist/src/evaluator/index.d.ts +2 -2
  741. package/dist/src/evaluator/interface.d.ts +7 -6
  742. package/dist/src/full.d.ts +17 -0
  743. package/dist/src/getUndefinedSymbols/index.d.ts +7 -0
  744. package/dist/src/index.d.ts +9 -12
  745. package/dist/src/initReferenceData.d.ts +1 -0
  746. package/dist/src/interface.d.ts +1 -2
  747. package/dist/src/modules/assert.d.ts +2 -0
  748. package/dist/src/modules/bitwise.d.ts +2 -0
  749. package/dist/src/modules/collection.d.ts +2 -0
  750. package/dist/src/modules/functional.d.ts +2 -0
  751. package/dist/src/modules/grid.d.ts +2 -0
  752. package/dist/src/modules/linear-algebra.d.ts +2 -0
  753. package/dist/src/modules/math.d.ts +2 -0
  754. package/dist/src/modules/matrix.d.ts +2 -0
  755. package/dist/src/modules/number-theory.d.ts +2 -0
  756. package/dist/src/modules/random.d.ts +2 -0
  757. package/dist/src/modules/sequence.d.ts +2 -0
  758. package/dist/src/modules/string.d.ts +2 -0
  759. package/dist/src/modules/vector.d.ts +2 -0
  760. package/dist/src/parser/ParserContext.d.ts +20 -0
  761. package/dist/src/parser/helpers.d.ts +19 -0
  762. package/dist/src/parser/index.d.ts +3 -3
  763. package/dist/src/parser/subParsers/getPrecedence.d.ts +3 -0
  764. package/dist/src/parser/subParsers/parseArray.d.ts +3 -0
  765. package/dist/src/parser/subParsers/parseBindingTarget.d.ts +6 -0
  766. package/dist/src/parser/subParsers/parseCond.d.ts +4 -0
  767. package/dist/src/parser/subParsers/parseDo.d.ts +3 -0
  768. package/dist/src/parser/subParsers/parseForOrDoseq.d.ts +4 -0
  769. package/dist/src/parser/subParsers/parseFunction.d.ts +4 -0
  770. package/dist/src/parser/subParsers/parseFunctionCall.d.ts +3 -0
  771. package/dist/src/parser/subParsers/parseIfOrUnless.d.ts +5 -0
  772. package/dist/src/parser/subParsers/parseImplicitBlock.d.ts +5 -0
  773. package/dist/src/parser/subParsers/parseLet.d.ts +4 -0
  774. package/dist/src/parser/subParsers/parseLoop.d.ts +4 -0
  775. package/dist/src/parser/subParsers/parseNumber.d.ts +3 -0
  776. package/dist/src/parser/subParsers/parseObject.d.ts +3 -0
  777. package/dist/src/parser/subParsers/parseOperand.d.ts +3 -0
  778. package/dist/src/parser/subParsers/parseRegexpShorthand.d.ts +3 -0
  779. package/dist/src/parser/subParsers/parseReservedSymbol.d.ts +3 -0
  780. package/dist/src/parser/subParsers/parseString.d.ts +4 -0
  781. package/dist/src/parser/subParsers/parseSwitch.d.ts +4 -0
  782. package/dist/src/parser/subParsers/parseSymbol.d.ts +3 -0
  783. package/dist/src/parser/subParsers/parseTry.d.ts +4 -0
  784. package/dist/src/parser/types.d.ts +126 -0
  785. package/dist/src/symbolPatterns.d.ts +2 -0
  786. package/dist/src/testFramework/index.d.ts +3 -2
  787. package/dist/src/tokenizer/minifyTokenStream.d.ts +4 -0
  788. package/dist/src/tokenizer/operators.d.ts +12 -0
  789. package/dist/src/tokenizer/reservedNames.d.ts +66 -0
  790. package/dist/src/tokenizer/token.d.ts +84 -0
  791. package/dist/src/tokenizer/tokenize.d.ts +8 -0
  792. package/dist/src/tokenizer/tokenizers.d.ts +14 -19
  793. package/dist/src/transformer/index.d.ts +2 -2
  794. package/dist/src/typeGuards/annotatedArrays.d.ts +16 -0
  795. package/dist/src/typeGuards/array.d.ts +1 -1
  796. package/dist/src/typeGuards/astNode.d.ts +19 -17
  797. package/dist/src/typeGuards/index.d.ts +1 -11
  798. package/dist/src/typeGuards/lits.d.ts +4 -2
  799. package/dist/src/typeGuards/litsFunction.d.ts +3 -3
  800. package/dist/src/typeGuards/number.d.ts +1 -1
  801. package/dist/src/typeGuards/string.d.ts +1 -1
  802. package/dist/src/untokenizer/index.d.ts +1 -1
  803. package/dist/src/utils/arity.d.ts +10 -0
  804. package/dist/src/utils/debug/debugTools.d.ts +0 -2
  805. package/dist/src/utils/debug/getCodeMarker.d.ts +2 -0
  806. package/dist/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
  807. package/dist/src/utils/docString/generateDocString.d.ts +2 -0
  808. package/dist/src/utils/getAssertionError.d.ts +1 -1
  809. package/dist/src/utils/index.d.ts +9 -6
  810. package/dist/testFramework.esm.js +1 -8913
  811. package/dist/testFramework.esm.js.map +1 -1
  812. package/dist/testFramework.js +1 -8916
  813. package/dist/testFramework.js.map +1 -1
  814. package/package.json +88 -8
  815. package/dist/cli/common/clojureDocs.d.ts +0 -1
  816. package/dist/cli/reference/categories/array.d.ts +0 -3
  817. package/dist/cli/reference/categories/assert.d.ts +0 -3
  818. package/dist/cli/reference/categories/bitwise.d.ts +0 -3
  819. package/dist/cli/reference/categories/collection.d.ts +0 -3
  820. package/dist/cli/reference/categories/functional.d.ts +0 -3
  821. package/dist/cli/reference/categories/math.d.ts +0 -3
  822. package/dist/cli/reference/categories/misc.d.ts +0 -3
  823. package/dist/cli/reference/categories/object.d.ts +0 -3
  824. package/dist/cli/reference/categories/predicate.d.ts +0 -3
  825. package/dist/cli/reference/categories/regularExpression.d.ts +0 -3
  826. package/dist/cli/reference/categories/sequence.d.ts +0 -3
  827. package/dist/cli/reference/categories/specialExpressions.d.ts +0 -3
  828. package/dist/cli/reference/categories/string.d.ts +0 -3
  829. package/dist/cli/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  830. package/dist/cli/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  831. package/dist/cli/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  832. package/dist/cli/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  833. package/dist/cli/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  834. package/dist/cli/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  835. package/dist/cli/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  836. package/dist/cli/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  837. package/dist/cli/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  838. package/dist/cli/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  839. package/dist/cli/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  840. package/dist/cli/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  841. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  842. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  843. package/dist/cli/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  844. package/dist/cli/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  845. package/dist/cli/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  846. package/dist/cli/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  847. package/dist/cli/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
  848. package/dist/cli/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  849. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  850. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  851. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  852. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  853. package/dist/cli/src/analyze/calculateOutcomes/index.d.ts +0 -18
  854. package/dist/cli/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  855. package/dist/cli/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
  856. package/dist/cli/src/analyze/index.d.ts +0 -17
  857. package/dist/cli/src/analyze/utils.d.ts +0 -4
  858. package/dist/cli/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
  859. package/dist/cli/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
  860. package/dist/cli/src/builtin/specialExpressions/comment.d.ts +0 -5
  861. package/dist/cli/src/builtin/specialExpressions/declared.d.ts +0 -5
  862. package/dist/cli/src/builtin/specialExpressions/defs.d.ts +0 -5
  863. package/dist/cli/src/builtin/specialExpressions/do.d.ts +0 -6
  864. package/dist/cli/src/builtin/specialExpressions/if-let.d.ts +0 -10
  865. package/dist/cli/src/builtin/specialExpressions/if-not.d.ts +0 -6
  866. package/dist/cli/src/builtin/specialExpressions/time.d.ts +0 -6
  867. package/dist/cli/src/builtin/specialExpressions/when-first.d.ts +0 -7
  868. package/dist/cli/src/builtin/specialExpressions/when-let.d.ts +0 -7
  869. package/dist/cli/src/builtin/specialExpressions/when-not.d.ts +0 -6
  870. package/dist/cli/src/builtin/specialExpressions/when.d.ts +0 -6
  871. package/dist/cli/src/identifier.d.ts +0 -8
  872. package/dist/cli/src/parser/interface.d.ts +0 -155
  873. package/dist/cli/src/parser/parsers.d.ts +0 -4
  874. package/dist/cli/src/removeCommentNodes/index.d.ts +0 -11
  875. package/dist/cli/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
  876. package/dist/cli/src/reservedNames.d.ts +0 -7
  877. package/dist/cli/src/tokenizer/index.d.ts +0 -9
  878. package/dist/cli/src/tokenizer/interface.d.ts +0 -35
  879. package/dist/cli/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
  880. package/dist/cli/src/tokenizer/sugar/index.d.ts +0 -3
  881. package/dist/cli/src/typeGuards/token.d.ts +0 -13
  882. package/dist/cli/src/unparser/UnparseOptions.d.ts +0 -15
  883. package/dist/cli/src/unparser/unparse.d.ts +0 -5
  884. package/dist/cli/src/unparser/unparseArrayLiteral.d.ts +0 -3
  885. package/dist/cli/src/unparser/unparseBindings.d.ts +0 -3
  886. package/dist/cli/src/unparser/unparseNormalExpression.d.ts +0 -3
  887. package/dist/cli/src/unparser/unparseObjectLiteral.d.ts +0 -3
  888. package/dist/cli/src/unparser/unparseParams.d.ts +0 -17
  889. package/dist/cli/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  890. package/dist/cli/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  891. package/dist/cli/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  892. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  893. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  894. package/dist/cli/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  895. package/dist/cli/src/unparser/utils.d.ts +0 -5
  896. package/dist/common/clojureDocs.d.ts +0 -1
  897. package/dist/reference/categories/array.d.ts +0 -3
  898. package/dist/reference/categories/assert.d.ts +0 -3
  899. package/dist/reference/categories/bitwise.d.ts +0 -3
  900. package/dist/reference/categories/collection.d.ts +0 -3
  901. package/dist/reference/categories/functional.d.ts +0 -3
  902. package/dist/reference/categories/math.d.ts +0 -3
  903. package/dist/reference/categories/misc.d.ts +0 -3
  904. package/dist/reference/categories/object.d.ts +0 -3
  905. package/dist/reference/categories/predicate.d.ts +0 -3
  906. package/dist/reference/categories/regularExpression.d.ts +0 -3
  907. package/dist/reference/categories/sequence.d.ts +0 -3
  908. package/dist/reference/categories/specialExpressions.d.ts +0 -3
  909. package/dist/reference/categories/string.d.ts +0 -3
  910. package/dist/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  911. package/dist/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  912. package/dist/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  913. package/dist/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  914. package/dist/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  915. package/dist/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  916. package/dist/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  917. package/dist/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  918. package/dist/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  919. package/dist/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  920. package/dist/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  921. package/dist/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  922. package/dist/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  923. package/dist/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  924. package/dist/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  925. package/dist/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  926. package/dist/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  927. package/dist/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  928. package/dist/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
  929. package/dist/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  930. package/dist/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  931. package/dist/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  932. package/dist/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  933. package/dist/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  934. package/dist/src/analyze/calculateOutcomes/index.d.ts +0 -18
  935. package/dist/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  936. package/dist/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
  937. package/dist/src/analyze/index.d.ts +0 -17
  938. package/dist/src/analyze/utils.d.ts +0 -4
  939. package/dist/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
  940. package/dist/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
  941. package/dist/src/builtin/specialExpressions/comment.d.ts +0 -5
  942. package/dist/src/builtin/specialExpressions/declared.d.ts +0 -5
  943. package/dist/src/builtin/specialExpressions/defs.d.ts +0 -5
  944. package/dist/src/builtin/specialExpressions/do.d.ts +0 -6
  945. package/dist/src/builtin/specialExpressions/if-let.d.ts +0 -10
  946. package/dist/src/builtin/specialExpressions/if-not.d.ts +0 -6
  947. package/dist/src/builtin/specialExpressions/time.d.ts +0 -6
  948. package/dist/src/builtin/specialExpressions/when-first.d.ts +0 -7
  949. package/dist/src/builtin/specialExpressions/when-let.d.ts +0 -7
  950. package/dist/src/builtin/specialExpressions/when-not.d.ts +0 -6
  951. package/dist/src/builtin/specialExpressions/when.d.ts +0 -6
  952. package/dist/src/identifier.d.ts +0 -8
  953. package/dist/src/parser/interface.d.ts +0 -155
  954. package/dist/src/parser/parsers.d.ts +0 -4
  955. package/dist/src/removeCommentNodes/index.d.ts +0 -11
  956. package/dist/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
  957. package/dist/src/reservedNames.d.ts +0 -7
  958. package/dist/src/tokenizer/index.d.ts +0 -9
  959. package/dist/src/tokenizer/interface.d.ts +0 -35
  960. package/dist/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
  961. package/dist/src/tokenizer/sugar/index.d.ts +0 -3
  962. package/dist/src/typeGuards/token.d.ts +0 -13
  963. package/dist/src/unparser/UnparseOptions.d.ts +0 -15
  964. package/dist/src/unparser/__tests__/testFormatter.d.ts +0 -1
  965. package/dist/src/unparser/unparse.d.ts +0 -5
  966. package/dist/src/unparser/unparseArrayLiteral.d.ts +0 -3
  967. package/dist/src/unparser/unparseBindings.d.ts +0 -3
  968. package/dist/src/unparser/unparseNormalExpression.d.ts +0 -3
  969. package/dist/src/unparser/unparseObjectLiteral.d.ts +0 -3
  970. package/dist/src/unparser/unparseParams.d.ts +0 -17
  971. package/dist/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  972. package/dist/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  973. package/dist/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  974. package/dist/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  975. package/dist/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  976. package/dist/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  977. package/dist/src/unparser/utils.d.ts +0 -5
package/README.md CHANGED
@@ -1,146 +1,1595 @@
1
+ # Lits
1
2
 
3
+ A functional language with algebraic notation and JavaScript interoperability.
2
4
 
3
- # Lits
5
+ Try it in the [Lits Playground](https://mojir.github.io/lits/).
4
6
 
5
- Lits is a programming language and REPL (Read-Eval-Print Loop) that allows you to evaluate Lisp expressions. It provides a playground for experimenting with Lits and an API for integrating Lits into your own projects.
7
+ ## TODO
8
+ Fix playground, it looks a bit funky under modules.
9
+ Also fix Header, were name, module and category should be presented
6
10
 
7
- Lits is a Lisp dialect implemented in TypeScript, drawing heavy inspiration from Clojure. Most core functions have been ported to Lits, ensuring a robust and familiar experience for Clojure users.
11
+ Model cli as module, create a new bundle that include this module. The existing full bundle should not include this.
8
12
 
9
- * **Dependencies**: No third party dependencies.
10
- * **Immutability**: All datatypes in Lits are immutable.
11
- * **Pure Functions**: Functions are [pure](https://en.wikipedia.org/wiki/Pure_function) by default. Functions with side effects have names ending in an exclamation mark (!), such as `write!` or `rand!`
12
- * **Type Mapping**: All datatypes in Lits map directly to JavaScript types.
13
- * **Evaluation**: Lits does not support lazy evaluation.
14
- * **Macros**:Macros are not supported in Lits.
15
- * **Keyword Symbols**: There are no keyword symbols. The notation `:foo` is simply shorthand for the string `"foo"`
16
- * **Scoping**: Lits uses [dynamic scoping](https://en.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scope) not [lexical scoping](https://en.wikipedia.org/wiki/Scope_(computer_science)#Lexical_scope)
17
13
 
18
- ## Documentation
19
14
 
20
- You can find the Lits playground [here](https://mojir.github.io/lits/#index). The playground allows you to interactively write and evaluate Lits expressions.
15
+ ## Features
16
+
17
+ - **Pure functional language** - Variables cannot be changed, ensuring predictable behavior and easier reasoning about code
18
+ - **Expression-based syntax** - Everything in Lits is an expression that returns a value; there are no statements, making the language highly composable and consistent
19
+ - **Fully serializable** - Every value returned from Lits evaluation, including functions and regexps, is serializable as JSON
20
+ - **JavaScript interoperability** - JavaScript values and functions can easily be exposed in Lits
21
+ - **First-class functions** - Functions are treated as values that can be passed to other functions
22
+ - **Algebraic notation** - All operators can be used as functions, and functions that take two parameters can be used as operators
23
+ - **Comprehensive standard library** - Rich set of functions for collections, math, strings, and more
24
+ - **Structural equality** - Objects are compared by value, not by reference
25
+ - **Destructuring** - Extract values from complex data structures with ease
26
+ - **Lexical scoping** - Variables are scoped to their defining context
21
27
 
22
28
  ## Installation
23
29
 
24
- To install Lits globally, run the following command:
30
+ ### As a Library
25
31
 
32
+ ```bash
33
+ npm install @mojir/lits
26
34
  ```
27
- npm i -g @mojir/lits
28
- ```
29
- ## Repl usage
30
- Initiate the Lits REPL in a terminal by typing `lits`. If Lits hasn't been installed globally, you can use `npx lits` instead.
31
35
 
32
- * Tab completion
33
- * History stored on file
36
+ ### CLI Tool
34
37
 
38
+ Install globally to use the Lits command-line interface:
39
+
40
+ ```bash
41
+ npm install --global @mojir/lits
35
42
  ```
43
+
44
+ #### CLI Usage
45
+
46
+ ```bash
47
+ # Start an interactive REPL session
36
48
  $ lits
37
- Type "`help" for more information.
38
- > (+ 7 4)
39
- 11
40
- > (let ((day (* 24 60 60 1000))) (* 7 day)) ; Ever wondered how many milliseconds there are in a week?
41
- 604800000
49
+
50
+ # Evaluate Lits code directly
51
+ $ lits -e "5 + 3"
52
+ $ lits -e "[1, 2, 3, 4] filter odd? map inc"
53
+
54
+ # Run a Lits file
55
+ $ lits -f script.lits
56
+ $ lits -f examples/factorial.lits
57
+
58
+ # Get help
59
+ $ lits --help
60
+ ```
61
+
62
+ The REPL provides an interactive environment where you can experiment with Lits code, test functions, and explore the language features in real-time.
63
+
64
+ ## Quick Start
65
+
66
+ Here's a simple example to get you started:
67
+
68
+ ```lits
69
+ // Defining a function - note that everything returns a value
70
+ let square = x -> x * x;
71
+
72
+ // Using the function
73
+ let result = square(5);
74
+ // => 25
75
+
76
+ // Using function as an operator
77
+ let squares = [1, 2, 3, 4, 5] map square;
78
+ // => [1, 4, 9, 16, 25]
79
+
80
+ // Using operator as a function
81
+ +(1, 2, 3, 4, 5);
82
+ // => 15
42
83
  ```
84
+
85
+ ## Expression-Based Language
86
+
87
+ In Lits, everything is an expression that evaluates to a value. This means:
88
+
89
+ ```lits
90
+ // Conditional expressions always return a value
91
+ let a = 10;
92
+ let result = if a > 0 then "positive" else "non-positive" end;
93
+
94
+ // Function definitions are expressions that return the function
95
+ let add = (a, b) -> a + b;
96
+
97
+ // Even variable bindings return the bound value
98
+ let x = let y = 5; // x becomes 5
99
+
100
+ // Blocks are expressions - they return the last expression's value
101
+ let value = do
102
+ let temp = 42;
103
+ temp * 2 + 1 // => 85
104
+ end;
43
105
  ```
44
- $ lits --help
45
- Usage: lits [options]
106
+ This expression-based design makes Lits highly composable and eliminates the statement/expression distinction found in many other languages.
107
+
108
+ ## Basic Syntax
109
+
110
+ ### Data Types
111
+
112
+ ```lits
113
+ // Numbers
114
+ 42; // integer
115
+ 3.14; // float
116
+ 0xFFFF; // hexadecimal
117
+ 0b1100; // binary
118
+ 0o77; // octal
119
+ -2.3e-2; // scientific notation
120
+
121
+ // Strings
122
+ "Hello, world!";
123
+ "String with \"escapes\"";
124
+
125
+ // Booleans
126
+ true;
127
+ false;
128
+
129
+ // Functions
130
+ (x -> x * 2); // Anonymous function
131
+ let add = (a, b) -> a + b; // Named function
132
+
133
+ // Regular expressions
134
+ #"[a-z]+";
135
+ #"\d{3}-\d{3}-\d{4}";
136
+
137
+ // null
138
+ null;
139
+ ```
140
+
141
+ #### Arrays (General Collections)
142
+
143
+ Arrays are the primary collection type in Lits, supporting mixed data types:
144
+
145
+ ```lits
146
+ // Basic arrays
147
+ [1, 2, 3, 4, 5];
148
+ ["apple", "banana", "orange"];
149
+ [true, 42, "mixed types"];
150
+
151
+ // Nested arrays
152
+ [[1, 2], [3, 4], [5, 6]];
153
+ [{name: "Alice"}, {name: "Bob"}];
154
+
155
+ // Array operations
156
+ let numbers = [1, 2, 3, 4, 5];
157
+ numbers[0]; // => 1 (indexing)
158
+ count(numbers); // => 5 (length)
159
+ first(numbers); // => 1
160
+ last(numbers); // => 5
161
+ rest(numbers); // => [2, 3, 4, 5]
162
+
163
+ // Functional array operations
164
+ numbers map -> $ * 2; // => [2, 4, 6, 8, 10]
165
+ numbers filter odd?; // => [1, 3, 5]
166
+ ```
167
+
168
+ #### Vectors (Number Arrays)
169
+
170
+ A vector is simply a non-empty array containing only numbers. The `vec` module provides mathematical operations specifically for these number arrays:
171
+
172
+ ```lits
173
+ // Import vector and linear algebra modules
174
+ let vec = import("vector");
175
+ let lin = import("linear-algebra");
176
+
177
+ // Vectors are just number arrays
178
+ [1, 2, 3, 4, 5]; // This is a vector
179
+ [3.14, 2.71, 1.41]; // This is also a vector
180
+ [1, "hello", 3]; // This is NOT a vector (mixed types)
181
+ []; // This is NOT a vector (empty)
182
+
183
+ // Vector creation functions
184
+ vec.zeros(5); // => [0, 0, 0, 0, 0]
185
+ vec.ones(3); // => [1, 1, 1]
186
+ vec.linspace(0, 10, 5); // => [0, 2.5, 5, 7.5, 10]
187
+ vec.fill(4, 3.14); // => [3.14, 3.14, 3.14, 3.14]
188
+ vec.generate(5, -> $ * 2); // => [0, 2, 4, 6, 8]
189
+
190
+ // Vector mathematical operations (use lin module for vector math)
191
+ lin.dot([1, 2, 3], [4, 5, 6]); // => 32 (dot product)
192
+ lin.euclidean-norm([3, 4]); // => 5.0 (Euclidean norm/magnitude)
193
+ lin.normalize-l2([3, 4]); // => [0.6, 0.8] (unit vector)
194
+ lin.euclidean-distance([0, 0], [3, 4]); // => 5.0 (Euclidean distance)
195
+
196
+ // Vector statistical operations (sum, mean, median, prod are core built-ins)
197
+ sum([1, 2, 3, 4]); // => 10
198
+ mean([1, 2, 3, 4]); // => 2.5
199
+ median([1, 2, 3, 4, 5]); // => 3
200
+ vec.stdev([1, 2, 3, 4]); // => 1.29... (standard deviation)
201
+ vec.variance([1, 2, 3, 4]); // => 1.67... (variance)
202
+
203
+ // Vector analysis (min and max are core built-ins)
204
+ min([3, 1, 4, 1, 5]); // => 1
205
+ max([3, 1, 4, 1, 5]); // => 5
206
+ vec.min-index([3, 1, 4]); // => 1 (index of minimum)
207
+ vec.max-index([3, 1, 4]); // => 2 (index of maximum)
208
+
209
+ // Cumulative operations
210
+ vec.cumsum([1, 2, 3, 4]); // => [1, 3, 6, 10]
211
+ vec.cumprod([1, 2, 3, 4]); // => [1, 2, 6, 24]
212
+
213
+ // Vector predicates
214
+ vec.increasing?([1, 1, 2, 3, 4]); // => true
215
+ vec.strictly-increasing?([1, 1, 2, 3, 4]); // => false
216
+
217
+ // Structural equality works with all vectors
218
+ [1, 2, 3] == [1, 2, 3]; // => true
219
+ [1, 2] == [1, 2, 3]; // => false
220
+ ```
221
+
222
+ #### Matrices (2D Vectors)
223
+
224
+ A matrix is a 2D array where each row is a vector (non-empty array of numbers) and all rows have the same length. The `mat` module provides linear algebra operations for these structures:
225
+
226
+ ```lits
227
+ // Import matrix module
228
+ let mat = import("matrix");
229
+
230
+ // Matrices are 2D number arrays with consistent row lengths
231
+ [[1, 2], [3, 4]]; // This is a 2x2 matrix
232
+ [[1, 2, 3], [4, 5, 6]]; // This is a 2x3 matrix
233
+ [[1, 2], [3, 4, 5]]; // This is NOT a matrix (inconsistent row length)
234
+ [[1, "hello"], [3, 4]]; // This is NOT a matrix (contains non-numbers)
235
+ [[]]; // This is NOT a matrix (contains empty row)
236
+
237
+ // Basic matrix operations
238
+ let matrixA = [[1, 2], [3, 4]];
239
+ let matrixB = [[5, 6], [7, 8]];
240
+
241
+ mat.mul(matrixA, matrixB); // => [[19, 22], [43, 50]] (multiplication)
242
+ mat.det(matrixA); // => -2 (determinant)
243
+ mat.inv(matrixA); // => [[-2, 1], [1.5, -0.5]] (inverse)
244
+ mat.trace(matrixA); // => 5 (trace - sum of diagonal)
245
+
246
+ // Matrix construction
247
+ mat.hilbert(3); // => 3x3 Hilbert matrix
248
+ mat.vandermonde([1, 2, 3]); // => Vandermonde matrix from vector
249
+ mat.band(4, 1, 1); // => 4x4 band matrix
250
+
251
+ // Matrix properties and predicates
252
+ mat.symmetric?([[1, 2], [2, 1]]); // => true
253
+ mat.invertible?([[1, 2], [3, 4]]); // => true
254
+ mat.square?([[1, 2], [3, 4]]); // => true
255
+ mat.diagonal?([[1, 0], [0, 2]]); // => true
256
+ mat.identity?([[1, 0], [0, 1]]); // => true
257
+
258
+ // Advanced matrix operations
259
+ mat.adj(matrixA); // => [[4, -2], [-3, 1]] (adjugate)
260
+ mat.cofactor(matrixA); // => cofactor matrix
261
+ mat.minor(matrixA, 0, 1); // => minor by removing row 0, col 1
262
+ mat.frobenius-norm(matrixA); // => Frobenius norm
263
+ mat.one-norm(matrixA); // => 1-norm (max column sum)
264
+ mat.inf-norm(matrixA); // => infinity norm (max row sum)
265
+ mat.max-norm(matrixA); // => max norm (largest absolute element)
266
+
267
+ // Matrix analysis
268
+ mat.rank(matrixA); // => matrix rank
269
+ ```
270
+
271
+ #### Objects (Maps)
272
+
273
+ Objects store key-value pairs:
274
+
275
+ ```lits
276
+ // Object creation
277
+ { name: "John", age: 30 };
278
+ { "key with spaces": "value", count: 42 };
279
+
280
+ // Nested objects
281
+ {
282
+ person: { name: "Alice", age: 25 },
283
+ scores: [95, 87, 92],
284
+ active: true
285
+ };
286
+
287
+ // Object operations
288
+ let user = { name: "Bob", age: 30, city: "NYC" };
289
+ get(user, "name"); // => "Bob"
290
+ assoc(user, "age", 31); // => new object with age updated
291
+ dissoc(user, "city"); // => new object without city
292
+ keys(user); // => ["name", "age", "city"]
293
+ vals(user); // => ["Bob", 30, "NYC"]
294
+ ```
295
+
296
+ #### Type Predicates
297
+
298
+ Lits provides predicate functions to check data types at runtime:
299
+
300
+ ```lits
301
+ // Basic type predicates
302
+ number?(42); // => true
303
+ string?("hello"); // => true
304
+ boolean?(true); // => true
305
+ function?(x -> x * 2); // => true
306
+ regexp?(#"[a-z]+"); // => true
307
+ array?([1, 2, 3]); // => true
308
+ object?({name: "Alice"}); // => true
309
+ null?(null); // => true
310
+
311
+ // Specialized array predicates
312
+ vector?([1, 2, 3]); // => true (non-empty number array)
313
+ vector?([1, "hello", 3]); // => false (mixed types)
314
+ vector?([]); // => false (empty)
315
+
316
+ matrix?([[1, 2], [3, 4]]); // => true (2D number array, consistent rows)
317
+ matrix?([[1, 2], [3]]); // => false (inconsistent row lengths)
318
+ matrix?([[]]); // => false (contains empty row)
319
+
320
+ // Collection predicates
321
+ sequence?([1, 2, 3]); // => true (sequences: strings and arrays)
322
+ sequence?("hello"); // => true
323
+ sequence?({a: 1}); // => false
324
+
325
+ collection?([1, 2, 3]); // => true (collections: strings, arrays, objects)
326
+ collection?("hello"); // => true
327
+ collection?({a: 1}); // => true
328
+ collection?(42); // => false
329
+ ```
330
+
331
+ #### Type Hierarchy
332
+
333
+ The type predicates follow a logical hierarchy:
334
+
335
+ ```lits
336
+ // If something is a matrix, it's also a vector and an array
337
+ let mat = [[1, 2], [3, 4]];
338
+ matrix?(mat); // => true
339
+ vector?(mat); // => true (matrix is a special vector)
340
+ array?(mat); // => true (vector is a special array)
341
+
342
+ // If something is a vector, it's also an array
343
+ let vec = [1, 2, 3];
344
+ vector?(vec); // => true
345
+ array?(vec); // => true
346
+
347
+ // But not all arrays are vectors
348
+ let arr = [1, "hello", 3];
349
+ array?(arr); // => true
350
+ vector?(arr); // => false (contains non-numbers)
351
+ ```
352
+
353
+ Each data type is immutable by design - operations return new values rather than modifying existing ones, ensuring predictable behavior and easier reasoning about code.
354
+
355
+ ### Mathematical Constants
356
+
357
+ Lits provides predefined mathematical constants:
358
+
359
+ ```lits
360
+ PI; // => 3.141592653589793
361
+ π; // => 3.141592653589793 (Unicode alternative)
362
+ E; // => 2.718281828459045 (Euler's number)
363
+ ε; // => 2.718281828459045 (Unicode alternative)
364
+ PHI; // => 1.618033988749895 (Golden ratio)
365
+ φ; // => 1.618033988749895 (Unicode alternative)
366
+
367
+ // Infinity values
368
+ POSITIVE_INFINITY; // => Infinity
369
+ ∞; // => Infinity (Unicode alternative)
370
+ NEGATIVE_INFINITY; // => -Infinity
371
+
372
+ // Integer and float limits
373
+ MAX_SAFE_INTEGER; // => 9007199254740991
374
+ MIN_SAFE_INTEGER; // => -9007199254740991
375
+ MAX_VALUE; // => 1.7976931348623157e+308
376
+ MIN_VALUE; // => 5e-324
377
+ ```
378
+
379
+ ## Special Expressions
380
+
381
+ ### Variable Binding
382
+
383
+ #### Let
384
+
385
+ ```lits
386
+ // Simple binding
387
+ let x = 10;
388
+ // => 10
389
+
390
+ // Variables are immutable
391
+ // let x = 20; // Error: x is already defined
392
+
393
+ // Shadowing in inner scopes
394
+ let y = do
395
+ let x = 20;
396
+ x
397
+ end;
398
+ // => 20, outer x is still 10
399
+ ```
400
+
401
+ #### Destructuring
402
+
403
+ ##### Basic Object Destructuring
404
+
405
+ ```lits
406
+ // Object destructuring
407
+ let { name, age } = { name: "John", age: 30 };
408
+ // name => "John", age => 30
409
+ ```
410
+
411
+ ```lits
412
+ // With default values
413
+ let { name = "Unknown", age = 0 } = { name: "John" };
414
+ // name => "John", age => 0
415
+ ```
416
+
417
+ ```lits
418
+ // Renaming with 'as'
419
+ let { name as userName } = { name: "Dave" };
420
+ // userName => "Dave"
421
+ ```
422
+
423
+ ```lits
424
+ // Multiple renames
425
+ let { firstName as name, age as years } = { firstName: "Eve", age: 28 };
426
+ // name => "Eve", years => 28
427
+ ```
428
+
429
+ ##### Advanced Destructuring Patterns
430
+
431
+ ```lits
432
+ // Complex nested destructuring with defaults and renaming
433
+ let {
434
+ name as userName = "Guest",
435
+ profile: {
436
+ age = 0,
437
+ contact: { email as userEmail = "none" }
438
+ },
439
+ settings = { theme: "light" },
440
+ scores as userScores = [],
441
+ ...others
442
+ } = { name: "Sam", profile: { contact: {} } };
443
+ // userName => "Sam", age => 0, userEmail => "none", etc.
444
+ ```
445
+
446
+ ```lits
447
+ // Combining array and object destructuring
448
+ let [{ name }, { age }] = [{ name: "Tina" }, { age: 33 }];
449
+ // name => "Tina", age => 33
450
+ ```
451
+
452
+ ```lits
453
+ // Object with array property destructuring
454
+ let { name, scores: [one, two] } = { name: "Uma", scores: [85, 92] };
455
+ // name => "Uma", one => 85, two => 92
456
+ ```
457
+
458
+ ##### Array Destructuring
459
+
460
+ ```lits
461
+ // Array destructuring
462
+ let [, , a, b] = [1, 2, 3, 4];
463
+ // a => 3, b => 4
464
+ ```
465
+
466
+ ```lits
467
+ // Array destructuring with defaults
468
+ let [one, two = 2] = [1];
469
+ // one => 1, two => 2
470
+ ```
471
+
472
+ ```lits
473
+ // Skipping elements
474
+ let [x, , z] = [1, 2, 3];
475
+ // x => 1, z => 3
476
+ ```
477
+
478
+ ##### Rest Patterns
479
+
480
+ ```lits
481
+ // Array rest pattern
482
+ let [head, ...tail] = [1, 2, 3, 4];
483
+ // head => 1, tail => [2, 3, 4]
484
+ ```
485
+
486
+ ```lits
487
+ // Object rest pattern
488
+ let { name, ...otherProps } = { name: "John", age: 30, city: "NYC" };
489
+ // name => "John", otherProps => { age: 30, city: "NYC" }
490
+ ```
491
+
492
+ ```lits
493
+ // Empty rest patterns
494
+ let [only, ...empty] = [1];
495
+ // only => 1, empty => []
496
+ ```
497
+
498
+ ##### Function Parameter Destructuring
499
+
500
+ ```lits
501
+ // Basic parameter destructuring
502
+ let greet = ({ name }) -> "Hello, " ++ name;
503
+ greet({ name: "Pat" });
504
+ // => "Hello, Pat"
505
+ ```
506
+
507
+ ```lits
508
+ // With defaults in parameters
509
+ let greet2 = ({ name = "friend" }) -> "Hello, " ++ name;
510
+ greet2({});
511
+ // => "Hello, friend"
512
+ ```
513
+
514
+ ```lits
515
+ // Nested parameter destructuring
516
+ let processUser = ({ profile: { name, age }}) ->
517
+ name ++ " is " ++ str(age);
518
+ processUser({ profile: { name: "Quinn", age: 29 }});
519
+ // => "Quinn is 29"
520
+ ```
521
+
522
+ ```lits
523
+ // Array parameter destructuring
524
+ let processCoords = ([x, y]) -> x + y;
525
+ processCoords([3, 4]);
526
+ // => 7
527
+ ```
528
+
529
+ ### Functions
530
+
531
+ #### Lambda Functions
532
+
533
+ ```lits
534
+ // Multi-parameter lambda
535
+ let add = (a, b) -> a + b;
536
+
537
+ // Single parameter (parentheses optional)
538
+ let square = x -> x * x;
539
+
540
+ // No parameters
541
+ let constant = () -> 42;
542
+
543
+ // Positional arguments
544
+ let add-v2 = -> $1 + $2;
545
+
546
+ // Single positional argument
547
+ let square-v2 = -> $ * $;
548
+
549
+ // Self-reference for recursion
550
+ let factorial = n ->
551
+ if n <= 1 then
552
+ 1
553
+ else
554
+ n * self(n - 1)
555
+ end;
556
+ ```
557
+
558
+ ### Control Flow
559
+
560
+ #### If/Unless
561
+
562
+ ```lits
563
+ let x = 15; // Fixed value for compilation
564
+
565
+ if x > 10 then
566
+ "large"
567
+ else
568
+ "small"
569
+ end;
570
+ // => "large"
571
+
572
+ // If without else returns null
573
+ if false then "never" end;
574
+ // => null
46
575
 
47
- Options:
48
- -c, --context=... Context as a JSON string
49
- -C, --context-file=... Context file (.json file)
50
- -e, --eval=... Evaluate Lits expression
51
- -f, --file=... Evaluate .lits file
52
- -p, --test-pattern=... Test name pattern, used together with --test
53
- -t, --test=... Test .test.lits file
54
- --help Show this help
55
- --version Print lits version
576
+ // Unless (inverted if)
577
+ let y = 8;
578
+ unless y > 10 then
579
+ "small"
580
+ else
581
+ "large"
582
+ end;
583
+ // => "small"
56
584
  ```
585
+
586
+ #### Cond
587
+
588
+ ```lits
589
+ let x = 12;
590
+
591
+ // Multi-branch conditional
592
+ cond
593
+ case x < 5 then "small"
594
+ case x < 10 then "medium"
595
+ case x < 15 then "large"
596
+ case true then "extra large" // default case
597
+ end;
598
+ // => "large"
599
+
600
+ // Cond with complex conditions
601
+ let urgent = true;
602
+ let important = false;
603
+ let priority = cond
604
+ case urgent && important then "critical"
605
+ case urgent then "high"
606
+ case important then "medium"
607
+ case true then "low"
608
+ end;
609
+ // => "high"
57
610
  ```
58
- $ lits -e "(/ 81 9)"
59
- 9
611
+
612
+ #### Switch
613
+
614
+ ```lits
615
+ let x = 1;
616
+
617
+ // Switch on value
618
+ switch x
619
+ case 0 then "zero"
620
+ case 1 then "one"
621
+ case 2 then "two"
622
+ end;
623
+ // => "one"
624
+
625
+ // Switch with multiple cases
626
+ let userInput = "help";
627
+ let exit = () -> "exiting";
628
+ let showHelp = () -> "showing help";
629
+ let saveData = () -> "saving data";
630
+
631
+ switch userInput
632
+ case "quit" then exit()
633
+ case "help" then showHelp()
634
+ case "save" then saveData()
635
+ end;
636
+ // => "showing help"
637
+ ```
638
+
639
+ ### Loops and Iteration
640
+
641
+ #### For Comprehensions
642
+
643
+ ```lits
644
+ // Simple iteration
645
+ for (x in [1, 2, 3, 4]) -> x * 2;
646
+ // => [2, 4, 6, 8]
647
+
648
+ // With filtering (when clause)
649
+ for (x in [1, 2, 3, 4] when odd?(x)) -> x * 2;
650
+ // => [2, 6]
651
+
652
+ // With early termination (while clause)
653
+ for (x in [1, 2, 3, 4] while x < 3) -> x * 2;
654
+ // => [2, 4]
655
+
656
+ // With let bindings for intermediate calculations
657
+ for (x in [1, 2, 3] let doubled = x * 2) -> doubled + 1;
658
+ // => [3, 5, 7]
659
+
660
+ // Multiple iterators
661
+ for (x in [1, 2], y in [10, 20]) -> x + y;
662
+ // => [11, 21, 12, 22]
663
+
664
+ // Complex for comprehensions with multiple conditions
665
+ for (
666
+ i in range(10)
667
+ let ii = i ^ 2
668
+ while ii < 40
669
+ when ii % 3 == 0,
670
+ j in range(10)
671
+ when j % 2 == 1
672
+ ) -> ii + j;
673
+
674
+ // Using previous bindings in subsequent iterations
675
+ for (x in [1, 2], y in [x, 2 * x]) -> x * y;
676
+ // => [1, 2, 4, 8]
677
+
678
+ // Object iteration
679
+ for (entry in { a: 1, b: 2 } let [key, value] = entry) -> key ++ ":" ++ str(value);
680
+ // => ["a:1", "b:2"]
60
681
  ```
61
682
 
62
- # API
63
- ## Install api
683
+ #### Doseq (Side Effects)
64
684
 
685
+ ```lits
686
+ // For side effects only (returns null)
687
+ doseq (x in [1, 2, 3]) -> write!(x)
688
+ // Prints: 1 2 3, returns null
65
689
  ```
66
- npm i @mojir/lits
690
+
691
+ #### Loop (Tail Recursion)
692
+
693
+ ```lits
694
+ // Loop with recur for tail recursion
695
+ loop (n = 5, acc = 1) -> do
696
+ if zero?(n) then
697
+ acc
698
+ else
699
+ recur(n - 1, acc * n)
700
+ end
701
+ end;
702
+ // => 120 (factorial of 5)
703
+
704
+ // Complex loop with multiple variables
705
+ loop (items = [1, 2, 3, 4, 5], acc = 0, cnt = 0) -> do
706
+ if empty?(items) then
707
+ { sum: acc, average: acc / cnt }
708
+ else
709
+ recur(rest(items), acc + first(items), cnt + 1)
710
+ end
711
+ end;
67
712
  ```
68
713
 
69
- ## How to use?
714
+ ### Recursion with Recur
70
715
 
71
- ```ts
72
- import { Lits } from '@mojir/lits'
716
+ #### Function Recursion
73
717
 
74
- const lits = new Lits()
75
- lits.run("(+ 1 2 3 4)"); // returns 10
718
+ ```lits
719
+ // Simple recursive function with recur
720
+ let factorial = (n) -> do
721
+ if n <= 1 then
722
+ 1
723
+ else
724
+ n * recur(n - 1)
725
+ end
726
+ end;
727
+
728
+ // Tail-recursive function
729
+ let sumToN = (n, acc = 0) -> do
730
+ if zero?(n) then
731
+ acc
732
+ else
733
+ recur(n - 1, acc + n)
734
+ end
735
+ end;
76
736
  ```
77
737
 
78
- ## Tokenization and Parsing
79
- Lits provides two important functions for working with Lisp expressions: `lits.tokenize` and `lits.parse`.
738
+ ### Error Handling
739
+
740
+ #### Try/Catch
741
+
742
+ ```lits
743
+ // Basic try/catch
744
+ let riskyOperation = () -> throw("Something went wrong");
745
+ try
746
+ riskyOperation()
747
+ catch
748
+ "Something went wrong"
749
+ end;
80
750
 
81
- ### lits.tokenize
82
- The `lits.tokenize` function takes a string as input and returns a `TokenStream`. Tokens are the individual components of a Lisp expression, such as parentheses, symbols, numbers, and strings. Here's an example usage:
751
+ // With error binding
752
+ try
753
+ riskyOperation()
754
+ catch (error)
755
+ "Error: " ++ error.message
756
+ end;
83
757
 
758
+ // Try-catch for graceful degradation
759
+ let parseData = () -> { value: 42 };
760
+ let process = (val) -> val * 2;
761
+ try
762
+ let { value } = parseData();
763
+ process(value)
764
+ catch
765
+ "Using default value"
766
+ end;
84
767
  ```
85
- const lits = new Lits()
86
- const expression = "(+ 1 2)";
87
- const tokens = lits.tokenize(expression);
88
- console.log(tokens);
89
- // Output: {
90
- "tokens": [
91
- {
92
- "t": 101,
93
- "v": "("
94
- },
95
- {
96
- "t": 103,
97
- "v": "+"
98
- },
99
- {
100
- "t": 102,
101
- "v": "1"
102
- },
103
- {
104
- "t": 102,
105
- "v": "2"
106
- },
107
- {
108
- "t": 101,
109
- "v": ")"
768
+
769
+ #### Throw
770
+
771
+ ```lits
772
+ // Throwing errors
773
+ try
774
+ throw("Custom error message")
775
+ catch
776
+ "Caught an error"
777
+ end;
778
+
779
+ // Custom error messages in functions
780
+ let divide = (a, b) ->
781
+ if zero?(b) then
782
+ throw("Cannot divide by zero")
783
+ else
784
+ a / b
785
+ end;
786
+
787
+ // Conditional error throwing
788
+ let validateAge = (age) ->
789
+ cond
790
+ case age < 0 then throw("Age cannot be negative")
791
+ case age > 150 then throw("Age seems unrealistic")
792
+ case true then age
793
+ end;
794
+ ```
795
+
796
+ ### Block Expressions
797
+
798
+ ```lits
799
+ // Block for grouping expressions
800
+ let computeX = () -> 5;
801
+ let computeY = () -> 10;
802
+ let processResult = (z) -> z * 2;
803
+
804
+ let result = do
805
+ let x = computeX();
806
+ let y = computeY();
807
+ let z = x * y;
808
+ processResult(z)
809
+ end;
810
+
811
+ // Block with side effects
812
+ let loadData = () -> [1, 2, 3];
813
+ let processData = (data) -> data map -> $ * 2;
814
+
815
+ do
816
+ write!("Starting process...");
817
+ let data = loadData();
818
+ let processed = processData(data);
819
+ write!("Process completed");
820
+ processed
821
+ end
822
+ ```
823
+
824
+ ### Array and Object Construction
825
+
826
+ #### Array Construction
827
+
828
+ ```lits
829
+ // Array literal
830
+ [1, 2, 3, 4];
831
+
832
+ // Array function
833
+ array(1, 2, 3, 4);
834
+
835
+ // With spread
836
+ let small-set = [3, 4, 5];
837
+ [1, 2, ...small-set, 6];
838
+ // => [1, 2, 3, 4, 5, 6]
839
+ ```
840
+
841
+ #### Array Spread
842
+
843
+ ```lits
844
+ // Spread in array literals
845
+ let combined = [1, 2, ...[3, 4, 5], 6];
846
+ // => [1, 2, 3, 4, 5, 6]
847
+
848
+ // Multiple spreads
849
+ let start = [1, 2];
850
+ let middle = [3, 4];
851
+ let stop = [5, 6];
852
+ let result = [...start, ...middle, ...stop];
853
+ ```
854
+
855
+ #### Object Construction
856
+
857
+ ```lits
858
+ // Object literal with static keys
859
+ { name: "John", age: 30 };
860
+
861
+ // Object literal with dynamic keys using bracket notation
862
+ let keyName = "dynamic";
863
+ { [keyName]: "value", ["computed" ++ "Key"]: 42 };
864
+ // => { dynamic: "value", computedKey: 42 }
865
+
866
+ // Object function
867
+ object("name", "John", "age", 30);
868
+
869
+ // With spread
870
+ let defaults = { type: "Person", active: true };
871
+ {
872
+ ...defaults,
873
+ name: "John",
874
+ age: 30
875
+ };
876
+ // => { type: "Person", active: true, name: "John", age: 30 }
877
+
878
+ // Combining static and dynamic keys
879
+ let propName = "score";
880
+ {
881
+ id: 123,
882
+ [propName]: 95,
883
+ ["level" ++ "Number"]: 5
884
+ };
885
+ // => { id: 123, score: 95, levelNumber: 5 }
886
+ ```
887
+
888
+ #### Object Spread
889
+
890
+ ```lits
891
+ // Object spread for merging
892
+ let person = {
893
+ name: "John",
894
+ age: 30
895
+ };
896
+
897
+ let employee = {
898
+ ...person,
899
+ id: "E123",
900
+ department: "Engineering"
901
+ };
902
+ // => { name: "John", age: 30, id: "E123", department: "Engineering" }
903
+
904
+ // Spread with override
905
+ let defaults = {
906
+ name: "Default Name",
907
+ theme: "light",
908
+ active: true
909
+ };
910
+
911
+ let updated = {
912
+ ...defaults,
913
+ name: "Custom Name" // Override defaults.name
914
+ };
915
+ ```
916
+
917
+ ### Logical Operators
918
+
919
+ #### And/Or
920
+
921
+ ```lits
922
+ // Logical AND (short-circuit)
923
+ true && "second value"; // => "second value"
924
+ false && "never reached"; // => false
925
+
926
+ // Logical OR (short-circuit)
927
+ false || "default value"; // => "default value"
928
+ true || "never reached"; // => true
929
+
930
+ // Multiple arguments
931
+ &&(true, true, "all true"); // => "all true"
932
+ ||(false, false, "found"); // => "found"
933
+ ```
934
+
935
+ #### Null Coalescing
936
+
937
+ ```lits
938
+ // Null coalescing operator
939
+ null ?? "default"; // => "default"
940
+ 0 ?? "default"; // => 0 (only null/undefined are coalesced)
941
+ false ?? "default"; // => false
942
+ "" ?? "default"; // => ""
943
+ ```
944
+
945
+ ### Ternary Operator
946
+
947
+ ```lits
948
+ // Conditional expression
949
+ let age = 25;
950
+ let result = age >= 18 ? "adult" : "minor";
951
+
952
+ // Nested ternary
953
+ let score = 85;
954
+ let category = score >= 90 ? "A" : score >= 80 ? "B" : "C";
955
+
956
+ // With complex expressions
957
+ let isLoggedIn = () -> true;
958
+ let hasPermission = () -> true;
959
+ let status = isLoggedIn() && hasPermission() ? "authorized" : "unauthorized";
960
+ ```
961
+
962
+ ## Variable Names
963
+
964
+ Lits is generous with variable naming conventions, allowing a wide range of characters that would be invalid in many other programming languages.
965
+
966
+ ### Basic Rules
967
+
968
+ Variable names in Lits can contain almost any character except for a small set of reserved symbols. The only restrictions are:
969
+
970
+ **Illegal characters anywhere in a variable name:**
971
+ - Parentheses: `(` `)`
972
+ - Brackets: `[` `]`
973
+ - Braces: `{` `}`
974
+ - Quotes: `'` `"` `` ` ``
975
+ - Punctuation: `,` `.` `;`
976
+ - Whitespace: spaces, newlines, tabs
977
+
978
+ **Additional restrictions for the first character:**
979
+ - Cannot start with digits `0-9`
980
+
981
+ ### Unicode and Emoji Support
982
+
983
+ Beyond these minimal restrictions, Lits supports Unicode characters, including emojis, in variable names:
984
+
985
+ ```lits
986
+ // Unicode characters are welcome
987
+ let résultat = 42;
988
+ let naïve = "simple approach";
989
+ let coöperation = "working together";
990
+
991
+ // Emojis work too!
992
+ let 😅 = "grinning face with sweat";
993
+ let 🚀 = "rocket ship";
994
+ let result = 😅 ++ " " ++ 🚀;
995
+ // => "grinning face with sweat rocket ship"
996
+ ```
997
+
998
+ ### Quoted Variable Names
999
+
1000
+ For cases where you need to use the normally illegal characters in variable names, Lits supports quoted variable names using single quotes:
1001
+
1002
+ ```lits
1003
+ // Variables with spaces and special characters
1004
+ let 'A strange variable' = 42;
1005
+ let 'user.name' = "John Doe";
1006
+ let 'data[0]' = "first element";
1007
+ let 'function()' = "callable";
1008
+
1009
+ // Access them the same way
1010
+ 'A strange variable' + 8;
1011
+ // => 50
1012
+ ```
1013
+
1014
+ ### Practical Examples
1015
+
1016
+ Here are some examples showcasing the flexibility of Lits variable naming:
1017
+
1018
+ ```lits
1019
+ // Mathematical notation with Greek letters (avoiding reserved symbols)
1020
+ let α = 0.5;
1021
+ let β = 1.2;
1022
+ let γ = 2.0;
1023
+ let Δ = β - α;
1024
+
1025
+ // Descriptive names with special characters
1026
+ let user-name = "alice";
1027
+ let is-valid? = true;
1028
+ let counter! = 0;
1029
+
1030
+ // Mixed styles
1031
+ let dataSet₁ = [1, 2, 3];
1032
+ let dataSet₂ = [4, 5, 6];
1033
+ let 🔧config = { debug: true };
1034
+ ```
1035
+
1036
+ ### Important: Operator Spacing
1037
+
1038
+ Due to Lits' flexible variable naming, **operators must be separated by whitespace**. This is crucial to understand:
1039
+
1040
+ ```lits
1041
+ // This is a variable name, NOT addition!
1042
+ let x+1 = 42;
1043
+ let result1 = x+1; // => 42
1044
+
1045
+ // To perform addition, use spaces
1046
+ let x = 5;
1047
+ let result2 = x + 1; // => 6
1048
+
1049
+ // More examples of what looks like operations but are actually variable names
1050
+ let a-b = "subtraction variable";
1051
+ let c*d = "multiplication variable";
1052
+ let e/f = "division variable";
1053
+ let g<h = "comparison variable";
1054
+
1055
+ // To use these as actual operations, add spaces
1056
+ let a = 10;
1057
+ let b = 3;
1058
+ let a-sum = a + b; // Addition
1059
+ let a-diff = a - b; // Subtraction
1060
+ let a-prod = a * b; // Multiplication
1061
+ let a-quot = a / b; // Division
1062
+ let a-comp = a < b; // Comparison
1063
+ ```
1064
+
1065
+ Without whitespace, Lits treats the entire sequence as a single variable identifier. This applies to all operators, including comparison operators, logical operators, and arithmetic operators.
1066
+
1067
+ This flexibility allows for expressive and readable code while maintaining the functional programming paradigm that Lits embodies.
1068
+ ## Operators and Functions
1069
+
1070
+ ### Algebraic Notation
1071
+
1072
+ All functions that take two parameters can be used as operators:
1073
+
1074
+ ```lits
1075
+ // As a function
1076
+ max(5, 10); // => 10
1077
+
1078
+ // As an operator
1079
+ 5 max 10; // => 10
1080
+ ```
1081
+
1082
+ All operators can be used as functions:
1083
+
1084
+ ```lits
1085
+ // As an operator
1086
+ 5 + 3; // => 8
1087
+
1088
+ // As a function
1089
+ +(5, 3); // => 8
1090
+
1091
+ // Partial application with underscore placeholder
1092
+ let add5 = +(5, _);
1093
+ add5(3); // => 8
1094
+
1095
+ // Multiple placeholders
1096
+ let subtractTwoValues = -(100, _, _);
1097
+ subtractTwoValues(4, 3); // => 93
1098
+
1099
+ // Single placeholder in different positions
1100
+ let subtract = -(_, 2);
1101
+ subtract(10); // => 8
1102
+
1103
+ let divide = /(10, _);
1104
+ divide(2); // => 5
1105
+ ```
1106
+
1107
+ ### Data Types as Functions
1108
+
1109
+ Lits allows arrays, objects, numbers, and strings to be used as functions. This creates elegant, flexible code where data structures become accessors.
1110
+
1111
+ #### Arrays and Numbers as Index Accessors
1112
+
1113
+ Arrays can be called with an index to get an element, and numbers can be called with collections to access that index:
1114
+
1115
+ ```lits
1116
+ let arr = [10, 20, 30, 40];
1117
+
1118
+ // Array as function (accessing by index)
1119
+ arr(0); // => 10
1120
+ arr(2); // => 30
1121
+
1122
+ // Number as function (accessing array at that index)
1123
+ 2(arr); // => 30 (same as arr(2))
1124
+ 0(arr); // => 10 (same as arr(0))
1125
+ ```
1126
+
1127
+ #### Strings and Numbers for Character Access
1128
+
1129
+ Similar to arrays, strings support indexed access in both directions:
1130
+
1131
+ ```lits
1132
+ let name = "Albert";
1133
+
1134
+ // String as function (accessing character by index)
1135
+ name(0); // => "A"
1136
+ name(2); // => "b"
1137
+
1138
+ // Number as function (accessing string at that index)
1139
+ 2(name); // => "b" (same as name(2))
1140
+ 4(name); // => "r" (same as name(4))
1141
+ ```
1142
+
1143
+ #### Objects and Strings as Property Accessors
1144
+
1145
+ Objects can be called with property names, and strings can be called with objects to access properties:
1146
+
1147
+ ```lits
1148
+ let person = { foo: 1, bar: 2, name: "John" };
1149
+
1150
+ // Object as function (accessing property by key)
1151
+ person("foo"); // => 1
1152
+ person("name"); // => "John"
1153
+
1154
+ // String as function (accessing object property)
1155
+ "foo"(person); // => 1 (same as person("foo"))
1156
+ "bar"(person); // => 2 (same as person("bar"))
1157
+ ```
1158
+
1159
+ #### Powerful Higher-Order Function Applications
1160
+
1161
+ This feature makes higher-order functions incredibly flexible. You can pass data directly as accessor functions:
1162
+
1163
+ ```lits
1164
+ let data = [
1165
+ { name: "Alice", score: 95 },
1166
+ { name: "Bob", score: 87 },
1167
+ { name: "Carol", score: 92 }
1168
+ ];
1169
+
1170
+ // Extract names using string as function
1171
+ data map "name";
1172
+ // => ["Alice", "Bob", "Carol"]
1173
+
1174
+ // Extract scores using string as function
1175
+ data map "score";
1176
+ // => [95, 87, 92]
1177
+
1178
+ // Get second element of multiple arrays using number as function
1179
+ let arrays = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
1180
+ arrays map 1;
1181
+ // => [2, 5, 8]
1182
+
1183
+ // Access nested data
1184
+ let records = [
1185
+ { values: [10, 20, 30] },
1186
+ { values: [40, 50, 60] },
1187
+ { values: [70, 80, 90] }
1188
+ ];
1189
+
1190
+ // Get first value from each record's values array
1191
+ records map "values" map 0;
1192
+ // => [10, 40, 70]
1193
+ ```
1194
+
1195
+ #### Practical Examples
1196
+
1197
+ ```lits
1198
+ // Matrix column extraction
1199
+ let matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
1200
+ matrix map 1; // => [2, 5, 8] (second column)
1201
+
1202
+ // Object property extraction
1203
+ let users = [
1204
+ { id: 1, active: true },
1205
+ { id: 2, active: false },
1206
+ { id: 3, active: true }
1207
+ ];
1208
+ users map "active"; // => [true, false, true]
1209
+
1210
+ // String character extraction
1211
+ let words = ["hello", "world", "test"];
1212
+ words map 0; // => ["h", "w", "t"] (first characters)
1213
+
1214
+ // Complex data navigation
1215
+ let sales = [
1216
+ { quarter: "Q1", regions: { north: 100, south: 200 } },
1217
+ { quarter: "Q2", regions: { north: 150, south: 180 } }
1218
+ ];
1219
+ sales map "regions" map "north"; // => [100, 150]
1220
+ ```
1221
+
1222
+ This feature eliminates the need for verbose accessor functions and makes data transformation pipelines more concise and readable.
1223
+
1224
+ ### Parameter Order
1225
+
1226
+ Lits favors subject-first parameter order for better operator chaining:
1227
+
1228
+ ```lits
1229
+ // Function style
1230
+ filter([1, 2, 3, 4], odd?); // => [1, 3]
1231
+
1232
+ // Operator style (more readable)
1233
+ [1, 2, 3, 4] filter odd?; // => [1, 3]
1234
+ ```
1235
+
1236
+ ### Pipe Operator
1237
+
1238
+ The pipe operator `|>` passes the result of the left expression as the first argument to the right function:
1239
+
1240
+ ```lits
1241
+ // Without pipe operator
1242
+ reduce(map(filter([1, 2, 3, 4, 5, 6], odd?), -> $ * $), +, 0);
1243
+
1244
+ // With pipe operator (much more readable)
1245
+ [1, 2, 3, 4, 5, 6]
1246
+ |> filter(_, odd?)
1247
+ |> map(_, -> $ * $)
1248
+ |> reduce(_, +, 0);
1249
+ // => 35
1250
+
1251
+ // Simple transformations
1252
+ "hello world"
1253
+ |> upper-case
1254
+ |> split(_, " ")
1255
+ |> reverse
1256
+ |> join(_, "-");
1257
+ // => "WORLD-HELLO"
1258
+
1259
+ // Mathematical operations
1260
+ 10
1261
+ |> +(_, 5)
1262
+ |> *(_, 2)
1263
+ |> /(_, 3);
1264
+ // => 10 (10 + 5 = 15, 15 * 2 = 30, 30 / 3 = 10)
1265
+
1266
+ // Data processing pipeline
1267
+ { numbers: [1, 2, 3, 4, 5], multiplier: 3 }
1268
+ |> get(_, "numbers")
1269
+ |> filter(_, even?)
1270
+ |> map(_, *(_, 3))
1271
+ |> reduce(_, +, 0);
1272
+ // => 18 (even numbers [2, 4] -> [6, 12] -> sum = 18)
1273
+ ```
1274
+
1275
+ ### Operator Precedence
1276
+
1277
+ Lits follows a specific operator precedence order that determines how expressions are evaluated. Operators with higher precedence are evaluated first. When operators have the same precedence, they are evaluated left-to-right.
1278
+
1279
+ Here's the complete precedence table, from highest to lowest:
1280
+
1281
+ | Precedence | Operator(s) | Description | Example |
1282
+ |------------|-------------|-------------|---------|
1283
+ | 12 | `^` | Exponentiation | `2 ^ 3 ^ 2` → `2 ^ (3 ^ 2)` → `512` |
1284
+ | 11 | `*` `/` `%` | Multiplication, Division, Remainder | `6 + 4 * 2` → `6 + 8` → `14` |
1285
+ | 10 | `+` `-` | Addition, Subtraction | `10 - 3 + 2` → `7 + 2` → `9` |
1286
+ | 9 | `<<` `>>` `>>>` | Bit shift operations | `8 >> 1 + 1` → `8 >> 2` → `2` |
1287
+ | 8 | `++` | String concatenation | `"a" ++ "b" ++ "c"` → `"abc"` |
1288
+ | 7 | `<` `<=` `>` `>=` | Comparison operators | `3 + 2 > 4` → `5 > 4` → `true` |
1289
+ | 6 | `==` `≠` | Equality operators | `2 * 3 == 6` → `6 == 6` → `true` |
1290
+ | 5 | `&` `xor` `\|` | Bitwise operations | `4 \| 2 & 1` → `4 \| 0` → `4` |
1291
+ | 4 | `&&` `\|\|` `??` | Logical operations | `true && false \|\| true` → `false \|\| true` → `true` |
1292
+ | 3 | *function operators* | Binary functions used as operators | `5 max 3 + 2` → `5 max 5` → `5` |
1293
+ | 2 | `\|>` | Pipe operator | `[1,2] \|> map(_, inc) \|> sum` |
1294
+ | 1 | `?` `:` | Conditional (ternary) operator | `true ? 1 + 2 : 3` → `true ? 3 : 3` → `3` |
1295
+
1296
+ #### Examples of Precedence in Action
1297
+
1298
+ ```lits
1299
+ // Exponentiation has highest precedence
1300
+ 2 + 3 ^ 2; // => 2 + 9 = 11 (not 5^2 = 25)
1301
+
1302
+ // Multiplication before addition
1303
+ 2 + 3 * 4; // => 2 + 12 = 14 (not 5*4 = 20)
1304
+
1305
+ // String concatenation before comparison
1306
+ "a" ++ "b" == "ab"; // => "ab" == "ab" = true
1307
+
1308
+ // Comparison before logical AND
1309
+ 3 > 2 && 1 < 2; // => true && true = true
1310
+
1311
+ // Pipe has very low precedence
1312
+ let vec = import("vector");
1313
+ [1, 2, 3] |> map(_, inc) |> vec.sum; // Evaluates left to right
1314
+
1315
+ // Conditional has lowest precedence
1316
+ true ? 2 + 3 : 4 + 5; // => true ? 5 : 9 = 5
1317
+ ```
1318
+
1319
+ #### Using Parentheses
1320
+
1321
+ When in doubt, or to make your intent clear, use parentheses to override precedence:
1322
+
1323
+ ```lits
1324
+ // Without parentheses (follows precedence)
1325
+ 2 + 3 * 4; // => 14
1326
+
1327
+ // With parentheses (explicit grouping)
1328
+ (2 + 3) * 4; // => 20
1329
+
1330
+ // Complex expression with explicit grouping
1331
+ let a = 2;
1332
+ let b = 3;
1333
+ let c = 4;
1334
+ let d = true;
1335
+ let e = false;
1336
+ let f = 10;
1337
+ let g = 5;
1338
+ ((a + b) * c) > (d && e ? f : g) // => (5 * 4) > (false ? 10 : 5) = 20 > 5 = true;
1339
+ ```
1340
+
1341
+ #### Associativity
1342
+
1343
+ Most operators are left-associative, meaning they evaluate from left to right when they have the same precedence:
1344
+
1345
+ ```lits
1346
+ 10 - 5 - 2; // => (10 - 5) - 2 = 3 (not 10 - (5 - 2) = 7)
1347
+ "a" ++ "b" ++ "c"; // => ("a" ++ "b") ++ "c" = "abc"
1348
+ ```
1349
+
1350
+ **Exception**: Exponentiation (`^`) is right-associative:
1351
+ ```lits
1352
+ 2 ^ 3 ^ 2 // => 2 ^ (3 ^ 2) = 2 ^ 9 = 512 (not (2 ^ 3) ^ 2 = 64)
1353
+ ```
1354
+
1355
+ ## Built-in Functions
1356
+
1357
+ Lits comes with a comprehensive standard library of functions for:
1358
+
1359
+ - **Arithmetic and Math**: Basic operations, trigonometry, logarithms, rounding
1360
+ - **Collections**: Working with arrays and objects (get, assoc, merge, etc.)
1361
+ - **Sequences**: Filtering, mapping, reducing, sorting, and transforming data
1362
+ - **Strings**: Manipulation, formatting, encoding, and pattern matching
1363
+ - **Predicates**: Type checking and condition testing functions
1364
+ - **Functional Programming**: Function composition, partial application, and utilities
1365
+ - **Regular Expressions**: Pattern matching and text processing
1366
+ - **Bitwise Operations**: Low-level bit manipulation
1367
+ - **Assertions**: Testing and validation utilities
1368
+
1369
+ For a complete reference of all available functions with examples, visit the [Lits Playground](https://mojir.github.io/lits/) where you can explore the interactive documentation and try functions in real-time.
1370
+
1371
+ ## Serialization
1372
+
1373
+ A unique feature of Lits is that every result from evaluation is fully serializable as JSON, including functions and regular expressions:
1374
+
1375
+ ```lits
1376
+ // Functions are serializable
1377
+ let myFunction = x -> x * 2;
1378
+
1379
+ // Regular expressions are serializable
1380
+ let myRegex = #"[a-z]+";
1381
+
1382
+ // Complex data structures with functions are serializable
1383
+ let config = {
1384
+ transform: x -> x * 3,
1385
+ pattern: #"\d+",
1386
+ data: [1, 2, 3]
1387
+ };
1388
+
1389
+ // All of these can be serialized to JSON and later deserialized
1390
+ // back into working Lits values, preserving their functionality
1391
+ ```
1392
+
1393
+ ## Modules and Exports
1394
+
1395
+ ```lits
1396
+ // Export variables and functions
1397
+ export let pi = 3.14159;
1398
+ export let square = x -> x * x;
1399
+ // Exported values become available to other modules
1400
+ ```
1401
+
1402
+ ## Examples
1403
+
1404
+ ### Factorial
1405
+
1406
+ ```lits
1407
+ let factorial = n -> n <= 1 ? 1 : n * self(n - 1);
1408
+
1409
+ factorial(5); // => 120
1410
+ ```
1411
+
1412
+ ### Array Processing
1413
+
1414
+ ```lits
1415
+ let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
1416
+
1417
+ // Get even numbers squared
1418
+ let evenSquares = numbers
1419
+ |> filter(_, even?)
1420
+ |> map(_, -> $ * $);
1421
+ // => [4, 16, 36, 64, 100]
1422
+
1423
+ // Sum of odd numbers
1424
+ let oddSum = numbers
1425
+ |> filter(_, odd?)
1426
+ |> reduce(_, +, 0);
1427
+ // => 25
1428
+ ```
1429
+
1430
+ ### String Processing
1431
+
1432
+ ```lits
1433
+ let text = "Hello, World! How are you today?";
1434
+
1435
+ // Word count
1436
+ let wordCount = text
1437
+ |> split(_, #"\s+")
1438
+ |> count;
1439
+ // => 6
1440
+
1441
+ // Uppercase words longer than 4 characters
1442
+ let longWords = text
1443
+ |> split(_, #"\s+")
1444
+ |> filter(_, -> count($) > 4)
1445
+ |> map(_, upper-case);
1446
+ // => ["HELLO,", "WORLD!", "TODAY?"]
1447
+ ```
1448
+
1449
+ ### Data Transformation
1450
+
1451
+ ```lits
1452
+ let su = import("sequence");
1453
+ let users = [
1454
+ { name: "Alice", age: 30, department: "Engineering" },
1455
+ { name: "Bob", age: 25, department: "Marketing" },
1456
+ { name: "Charlie", age: 35, department: "Engineering" }
1457
+ ];
1458
+
1459
+ // Group by department and get average age
1460
+ let grouped = users |> su.group-by(_, "department");
1461
+ let departmentAges = grouped
1462
+ |> entries(_)
1463
+ |> map(_, ([dept, people]) -> do
1464
+ let ages = people |> map(_, "age");
1465
+ let total = ages |> reduce(_, +, 0);
1466
+ [dept, total / count(ages)]
1467
+ end)
1468
+ |> (pairs -> zipmap(map(pairs, 0), map(pairs, 1)));
1469
+ // => { "Engineering": 32.5, "Marketing": 25 }
1470
+ ```
1471
+
1472
+ ## JavaScript Interoperability
1473
+
1474
+ ### Entry Points and Bundles
1475
+
1476
+ The package provides multiple entry points for different use cases:
1477
+
1478
+ ```javascript
1479
+ // Minimal entry — core Lits class, types, and type guards only.
1480
+ // No modules or reference data. Smallest bundle size.
1481
+ import { Lits } from '@mojir/lits';
1482
+
1483
+ // Full entry — everything from minimal plus all modules,
1484
+ // reference data, and API helpers (e.g. apiReference, isApiName).
1485
+ import { Lits, allBuiltinModules, apiReference } from '@mojir/lits/full';
1486
+
1487
+ // Individual module entries — import only the modules you need.
1488
+ import { vectorModule } from '@mojir/lits/modules/vector';
1489
+ import { matrixModule } from '@mojir/lits/modules/matrix';
1490
+ import { linearAlgebraModule } from '@mojir/lits/modules/linearAlgebra';
1491
+ import { gridModule } from '@mojir/lits/modules/grid';
1492
+ import { randomModule } from '@mojir/lits/modules/random';
1493
+ import { assertModule } from '@mojir/lits/modules/assert';
1494
+ import { numberTheoryModule } from '@mojir/lits/modules/numberTheory';
1495
+ ```
1496
+
1497
+ To make module functions available in Lits code, pass them to the `Lits` constructor:
1498
+
1499
+ ```javascript
1500
+ import { Lits } from '@mojir/lits';
1501
+ import { vectorModule } from '@mojir/lits/modules/vector';
1502
+ import { matrixModule } from '@mojir/lits/modules/matrix';
1503
+
1504
+ const lits = new Lits({ modules: [vectorModule, matrixModule] });
1505
+
1506
+ // Now you can use import("vector") and import("matrix") in Lits code
1507
+ lits.run('let v = import("vector"); v.dot([1, 2, 3], [4, 5, 6])'); // => 32
1508
+ ```
1509
+
1510
+ ### Using Lits in JavaScript
1511
+
1512
+ ```javascript
1513
+ import { Lits } from '@mojir/lits';
1514
+
1515
+ const lits = new Lits();
1516
+
1517
+ // Basic usage
1518
+ const result1 = lits.run('+(1, 2, 3)');
1519
+ console.log(result1); // 6
1520
+
1521
+ // Provide JavaScript values
1522
+ const result2 = lits.run('name ++ " is " ++ str(age)', {
1523
+ values: { name: 'John', age: 30 }
1524
+ });
1525
+ console.log(result2); // "John is 30"
1526
+
1527
+ // Expose JavaScript functions
1528
+ const result3 = lits.run('myAlert("Hello from Lits!")', {
1529
+ jsFunctions: {
1530
+ myAlert: {
1531
+ fn: (message) => console.log(`Alert: ${message}`),
1532
+ arity: { min: 1, max: 1 }
110
1533
  }
111
- ]
1534
+ }
1535
+ });
1536
+
1537
+ // Parse and evaluate separately for better performance
1538
+ const tokens = lits.tokenize('+(5, 3)');
1539
+ const ast = lits.parse(tokens);
1540
+ const result4 = lits.evaluate(ast, {});
1541
+ ```
1542
+
1543
+ ### Lits Class Methods
1544
+
1545
+ ```typescript
1546
+ interface Lits {
1547
+ // Execute Lits code directly
1548
+ run(program: string, params?: ContextParams & FilePathParams): unknown
1549
+
1550
+ // Get execution context after running code
1551
+ context(programOrAst: string | Ast, params?: ContextParams & FilePathParams): Context
1552
+
1553
+ // Find undefined symbols in code
1554
+ getUndefinedSymbols(programOrAst: string | Ast, params?: ContextParams): Set<string>
1555
+
1556
+ // Parse pipeline
1557
+ tokenize(program: string, params?: FilePathParams & MinifyParams): TokenStream
1558
+ parse(tokenStream: TokenStream): Ast
1559
+ evaluate(ast: Ast, params: ContextParams): unknown
1560
+
1561
+ // Apply Lits function with JavaScript arguments
1562
+ apply(fn: LitsFunction, fnParams: unknown[], params?: ContextParams): unknown
1563
+
1564
+ // Utility methods
1565
+ transformSymbols(tokenStream: TokenStream, transformer: (symbol: string) => string): TokenStream
1566
+ untokenize(tokenStream: TokenStream): string
1567
+ getRuntimeInfo(): LitsRuntimeInfo
112
1568
  }
113
1569
  ```
114
1570
 
115
- ### Lits.parse
116
- The `lits.parse` function accepts a `TokenStream` as an argument and returns an Abstract Syntax Tree (AST). By compiling Lits expressions into an AST, you can significantly enhance the evaluation speed, achieving approximately a tenfold improvement.
117
-
118
- The AST is represented as a JSON document, which facilitates straightforward serialization.
119
-
120
- To evaluate an AST, utilize the `lits.evaluate` function.
121
-
122
- ```
123
- const lits = new Lits()
124
- const expression = "(+ 1 2)";
125
- const tokens = lits.tokenize(expression);
126
- const ast = lits.parse(tokens)
127
- console.log(tokens);
128
- // Output: {
129
- "b": [
130
- {
131
- "t": 203,
132
- "n": "+",
133
- "p": [
134
- {
135
- "t": 201,
136
- "v": 1
137
- },
138
- {
139
- "t": 201,
140
- "v": 2
141
- }
142
- ]
143
- }
144
- ]
1571
+ ### Context Parameters
1572
+
1573
+ ```typescript
1574
+ interface ContextParams {
1575
+ globalContext?: Context // Global variable context
1576
+ contexts?: Context[] // Additional context layers
1577
+ values?: Record<string, unknown> // JavaScript values to expose
1578
+ jsFunctions?: Record<string, JsFunction> // JavaScript functions to expose
1579
+ globalModuleScope?: boolean // Module scoping behavior
145
1580
  }
146
- ```
1581
+
1582
+ interface JsFunction {
1583
+ fn: (...args: any[]) => unknown // The JavaScript function
1584
+ arity?: Arity // Function arity constraints
1585
+ docString?: string // Documentation
1586
+ }
1587
+ ```
1588
+
1589
+ ## Learn More
1590
+
1591
+ - Try Lits in the [online playground](https://mojir.github.io/lits/)
1592
+ - Explore the comprehensive function reference
1593
+ - Check out more complex examples in the documentation
1594
+
1595
+ Lits combines the elegance of functional programming with practical syntax, making it perfect for data transformation, mathematical computation, and any scenario where immutability and expressiveness are valued.