fez-lisp 1.5.125 → 1.5.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/utils.js CHANGED
@@ -20,10 +20,14 @@ export const logError = (error) =>
20
20
  console.log('\x1b[31m', `\n${error}\n`, '\x1b[0m')
21
21
  export const logSuccess = (output) => console.log('\x1b[32m', output, '\x1b[0m')
22
22
  export const wrapInBracesString = (exp) => `(${stringifyArgs(exp)})`
23
- export const logExp = function (exp, marker = ':D') {
24
- console.log(marker, wrapInBracesString(exp), ...[...arguments].slice(2))
23
+ export const logExp = function (exp, ...args) {
24
+ console.log(wrapInBracesString(exp), ...args)
25
25
  return exp
26
26
  }
27
+ export const log = (x) => {
28
+ console.log(x)
29
+ return x
30
+ }
27
31
  export const formatCallstack = (callstack) =>
28
32
  callstack
29
33
  .reverse()
@@ -332,6 +336,7 @@ export const addTypeIdentities = (ast) => {
332
336
  identity(STATIC_TYPES.ATOM),
333
337
  identity(STATIC_TYPES.COLLECTION),
334
338
  identity(STATIC_TYPES.PREDICATE),
339
+ identity(STATIC_TYPES.NUMBER),
335
340
  identity(STATIC_TYPES.ANY),
336
341
  identity(STATIC_TYPES.UNKNOWN)
337
342
  )
@@ -457,6 +462,14 @@ export class Brr {
457
462
  for (let i = half; i < initial.length; ++i) this._addToRight(initial[i])
458
463
  return this
459
464
  }
465
+ // reverse() {
466
+ // const left = this._left
467
+ // const right = this._right
468
+ // right.unshift(left.shift())
469
+ // this._left = right
470
+ // this._right = left
471
+ // return this
472
+ // }
460
473
  *[Symbol.iterator]() {
461
474
  for (let i = 0, len = this.length; i < len; ++i) yield this.get(i)
462
475
  }