Download Latest Version 2.1.0 source code.zip (128.5 kB)
Email in envelope

Get an email when there's a new version of Moses

Home / Moses-2.0.0-1
Name Modified Size InfoDownloads / Week
Parent folder
2.0.0 source code.tar.gz 2018-08-23 105.6 kB
2.0.0 source code.zip 2018-08-23 116.7 kB
README.md 2018-08-23 2.8 kB
Totals: 3 Items   225.2 kB 0

2.0.0 (08/23/2018)

Breaking changes

  • library functions now accept iterators prototyped as f(v, k, ...) instead of f(k, v, ...). It improves the benefits of chaning and helps writting a clear functional-style code. Library functions affected with this breaking change are : each, eachi,countf, map, reduceby, select, reject, all, groupBy, countBy, selectWhile, dropWhile, findIndex, findLastIndex, chunk.
  • reduceby is now prototyped as reduceby(t, f, pred, state) instead of reduceby(t, f, state, pred).
  • times is now prototyped as times(iter, n, ...) instead of times(iter, n, ...).
  • bindAll was renamed to bindall
  • functions no longer accept optional sort third arguments
  • sliding was renamed to overlapping
  • Improved range to handle negative progressions and start the count from 1.
  • memoize no longer takes a hash function.

Other changes

  • Made shift a default library function, and pop its alias.
  • Moved shuffle from table function to array functions
  • Made iterator to accept an extra optional arg n

Additions

Added support for operators

  • Arithmetic operators : add, sub, mul, div, mod, exp, pow (alias to exp), unm, neg (alias to unm), floordiv, intdiv
  • Relational operators : eq, neq, lt, gt, le, ge
  • Logical operators : land, lor, lnot
  • Concatenation operator : concat
  • Length operator : length, len (alias to length)

Added functions

  • Added adjust in table functions
  • Added xprod in array functions
  • Added prepend in array functions
  • Added zeros in array functions
  • Added ones in array functions
  • Added vector in array functions
  • Added aperture in array functions
  • Added sum in array functions
  • Added product in array functions
  • Added mean in array functions
  • Added median in array functions
  • Added powerset in array functions
  • Added zipWith in array functions
  • Added pairwise in array functions
  • Added applySpec in utility functions
  • Added nthArg in utility functions
  • Added cond in utility functions
  • Added castArray in utility functions
  • Added unary in utility functions
  • Added ary in utility functions
  • Added rearg in utility functions
  • Added unfold in utility functions
  • Added converge in utility functions
  • Added path in object functions

Added function aliases

  • Added update as alias to adjust
  • Added always as alias to constant
  • Added intersperse as alias to interpose
  • Added sliding as alias to aperture
  • Added tabulate as alias to array
  • Added matches as alias to isEqual
  • Added average as alias to mean
  • Added nAry as alias to ary
  • Added transposeWith as alias to zipWith
Source: README.md, updated 2018-08-23