- Added
mapi (t, f)
in table functions.
- Fixed
chunk
to avoid generating chunks at index 0. - Made argument
f
tochunk
optional. Defaults toidentity
- Fixed alias to
uniqueId
- Fixed
M.powerset
- Prevents straight calls to io and os modules for Redis compatibility
- Renamed
toArray
topack
- Renamed
reduceby
toreduceBy
- Removed
skip
as alias tolast
- Changed prototype :
each(t, f, ...)
is noweach(t, f)
- Changed prototype :
eachi(t, f, ...)
is noweachi(t, f)
- Changed prototype :
adjust(t, key, f, ...)
is nowadjust(t, key, f)
- Changed prototype :
countf(t, f, ...)
is nowcountf(t, f)
- Changed prototype :
map(t, f, ...)
is nowmap(t, f)
- Changed prototype :
reduceBy(t, f, pred, state, ...)
is nowreduceBy(t, f, pred, state)
- Changed prototype :
select(t, f, ...)
is nowselect(t, f)
- Changed prototype :
reject(t, f, ...)
is nowreject(t, f)
- Changed prototype :
all(t, f, ...)
is nowall(t, f)
- Changed prototype :
invoke(t, method, ...)
is nowinvoke(t, method)
- Changed prototype :
min(t, transform, ...)
is nowmin(t, transform)
- Changed prototype :
max(t, transform, ...)
is nowmax(t, transform)
- Changed prototype :
countBy(t, iter, ...)
is nowcountBy(t, iter)
- Changed prototype :
groupBy(t, iter, ...)
is nowgroupBy(t, iter)
- Changed prototype :
selectWhile(array, f, ...)
is nowselectWhile(array, f)
- Changed prototype :
dropWhile(array, f, ...)
is nowdropWhile(array, f)
- Changed prototype :
findIndex(array, pred, ...)
is nowfindIndex(array, pred)
- Changed prototype :
findLastIndex(array, pred, ...)
is nowfindLastIndex(array, pred)
- Changed prototype :
chunk(array, f, ...)
is nowchunk(array, f)
- Changed prototype :
times(iter, n, ...)
is nowtimes(iter, n)
- Changed prototype :
template(id, ...)
is nowtemplate(id)
- Changed prototype :
tap(obj, f, ...)
is nowtap(obj, f)
- Changed prototype :
result(obj, method, ...)
is nowresult(obj, method)
- Changed prototype :
intersection(array, ...)
is nowintersection(array)
- Renamed
array
totabulate
, with no alias - Moved
invert
to object functions
- Added
best
in table functions - Added
allEqual
in table functions - Added
sortedk
iterator in array functions - Added
sortedv
iterator in array functions - Added
disjoint
in array functions - Added
nsorted
in array functions - Added
duplicates
in array functions - Added
xpairs
in array functions - Added
xpairsRight
in array functions - Added
call
in utility functions - Added
type
in object functions - Added
spreadPath
in object functions - Added
flattenPath
in object functions - Added
thread
in utility functions - Added
threadRight
in utility functions - Added
iterlen
in utility functions - Added
skip
in utility functions - Added
both
in utility functions - Added
either
in utility functions - Added
neither
in utility functions - Added
dispatch
in utility functions - Added
noarg
in utility functions
- library functions now accept iterators prototyped as
f(v, k, ...)
instead off(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 asreduceby(t, f, pred, state)
instead ofreduceby(t, f, state, pred)
.times
is now prototyped astimes(iter, n, ...)
instead oftimes(iter, n, ...)
.bindAll
was renamed tobindall
functions
no longer accept optionalsort
third argumentssliding
was renamed tooverlapping
- Improved
range
to handle negative progressions and start the count from 1. memoize
no longer takes ahash
function.
- Made
shift
a default library function, andpop
its alias. - Moved
shuffle
from table function to array functions - Made
iterator
to accept an extra optional argn
- Arithmetic operators :
add
,sub
,mul
,div
,mod
,exp
,pow
(alias toexp
),unm
,neg
(alias tounm
),floordiv
,intdiv
- Relational operators :
eq
,neq
,lt
,gt
,le
,ge
- Logical operators :
land
,lor
,lnot
- Concatenation operator :
concat
- Length operator :
length
,len
(alias tolength
)
- 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
update
as alias toadjust
- Added
always
as alias toconstant
- Added
intersperse
as alias tointerpose
- Added
sliding
as alias toaperture
- Added
tabulate
as alias toarray
- Added
matches
as alias toisEqual
- Added
average
as alias tomean
- Added
nAry
as alias toary
- Added
transposeWith
as alias tozipWith
- Added
_.array
- Added
_.clear
- Added
_.time
- Added
_.before
- Added
_.toObj
- Added
_.noop
- Added
_.partialRight
- Added
_.flip
- Added
_.overArgs
- Added
_.over
- Added
_.overEvery
- Added
_.overSome
- Added
_.curry
- Added
_.fill
- Added
.transpose
as an alias to_.zip
-
Added
_.bind2
-
Added
_.reduceby
-
Added
_.iterator
(and alias_.iter
) -
Added
_.sliding
-
Added
_.sample
-
Added
_.sampleProb
-
Added
_.where
-
Added
_.sortBy
-
Added
_.findIndex
-
Added
_.findLastIndex
-
Added
_.bindAll
-
Added
_.partial
-
Added
_.kvpairs
-
Added
_.property
-
Added
_.propertyOf
-
Added
_.constant
-
Added parameter
pad
to_.partition
- Improved
_.select
- Fixed
_.compose
- Made
_.contains
as an alias to_.include
- Improved
_.all
- Fixed
_.size
- Improved
_.map
to map key-value pairs to key-value pairs - Fixed
_.partition
to generate an error for partition size < 1.
- Aliases are available by default
_.find
is no longer an alias to_.detect
- Provided a new implementation of
_.unique
, removed argument_.isSorted
_.isNil
now returns true if arg is nil, an empty string or empty table and false otherwise._.size
now returns 0 for empty args instead ofnil
_.unique
no longer acceptsiter
argument to transform original array values._.cycle
argumentn
now defaults to 1._.groupBy
no longer handlesiter
as a string
- Renamed alias
_.uId
to_.uid
- Renamed
_.add
to_.addTop
- Renamed
_.uniq
as alias to_.unique
- Renamed
_.symmetric_difference
to_.symmetricDifference
- Removed
_.paired
_.reduce
now supports an array of booleans_.pick
now picks false values_.concat
argsi
andj
defaults explicitely to 1 and array length (for compatibility with LuaJIT)_.pop
now takes an optional extra-arg n, to be the number of values to be popped_.unshift
now takes an optional extra-arg n, to be the number of values to be retrieved- Moved explicitely
_.toArray
to array functions _.functions
accepts an extra-arg to prevent from looking-up for methods in metatables.
- Added
_.find
- Added
_.pipe
- Added
_.complement
- Added
_.juxtapose
and alias_.juxt
- Added
_.isunique
and alias_.isuniq
- Added
_.rep
- Added
_.interleave
- Added
_.interpose
- Added
_.partition
and alias_.part
- Added
_.permutation
and alias_.perm
- Added
_.compare
as alias to_.isEqual
- Added
_.isIterable
- Added
_.toBoolean
- Added
_.pull
and alias_.remove
- Added
_.at
- Added
_.xor
as alias to_.symmetricDifference
Renamed global MOSES_NO_ALIASES
to global MOSES_ALIASES
. Aliases are not available by default.
Added _.import
, export library to context or _G
Added noConflict
option to _.import
Added MOSES_NO_ALIASES
option when requiring the library
Added _.symmetric_difference
Added _.eachi
Added _.isInteger
Added _.cycle
Added _.count
Added _.countf
Added _.chunk
(inspired from Ruby's Enumerable #chunk)
Added _.chop
as alias to _.removeRange
Added _.skip
as alias to _.last
Added _.diff
as alias to _.difference
Added _.symdiff
as alias to _.symmetric_difference
Added _.forEachi
as alias to _.eachi
Added _.loop
as alias to _.cycle
Renamed _.pairs
to _.paired
Removed _.count
as alias to _.range
Changed _.difference behaviour
, now takes up to two arrays as args
Fixed internal inconsistencies with aliases, should not be used internally with regards to MOSES_NO_ALIASES
option.
Fixed _.each
implementation, should not return anything
- Added chaining interface
- Renamed
_.isObject
to_.isTable
- Added
_.tap
,_.chain
,_()
and_.value
- Added
_.findWhere
- Added
_.contains
- _.functions no longer takes an output table
- Changed _.isArray behaviour, returns true only for real Lua arrays
- Updated specs
- Updated docs and samples
- Removed _.iterate (slower than pairs, ipairs)
- Added _.identity
- Removed _.curry (was more like a closure, will provide a proper implementation later)
- Removed _.iter_to_array
- Most of all functions rewritten
- .import/.mixin now imports library functions to the global env.
- Added type checking functions as object functions
- Added new functions and aliases : Moses has 85 unique functions, 117 counting aliases.
- Added HTML docs
- Added Specs
- Added samples
- Added
_.takeWhile
(as alias to_.selectWhile
) - Added
_.dropWhile
and_.rejectWhile
(as alias) - Updated Moses_Lib_Test.lua
- Updated documentation
- Added
_.selectWhile
- Added
_.mapReduce
and_.mapr
(as alias) - Added
_.mapReduceRight
and_.maprr
(as alias) - Added
_.bindn
- Added
_.appendLists
- Updated Moses_Lib_Test.lua
- Updated documentation
- Removed
_.contains
as alias to_.include
- Added
_.removeRange
(as Array function) - Added
_.sameKeys
and_.contains
(as Collection functions) - Added
_.bind
(as Utility function) - Updated Moses_Lib_Test.lua
- Updated documentation
- Added
_.append
,_.invert
,_.import
,_.template
,_.curry
- Updated Moses_Lib_Test.lua
- Updated documentation
- Initial Release