Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CHANGELOG.md - github.com/Yonaba/Moses.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2596b64ca1dd4ef838e228fdd82c1b827581b564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# Version history

## Unreleased

### Additions

* Added `mapi (t, f)` in table functions.

### Fixes and improvements

* Fixed `chunk` to avoid generating chunks at index 0. 
* Made argument `f` to `chunk` optional. Defaults to `identity`
* Fixed alias to `uniqueId`
* Fixed `M.powerset`
* Prevents straight calls to io and os modules for Redis compatibility

## 2.1.0 (09/12/2018)

### Breaking changes

* Renamed `toArray` to `pack`
* Renamed `reduceby` to `reduceBy`
* Removed `skip` as alias to `last`
* Changed prototype : `each(t, f, ...)` is now `each(t, f)`
* Changed prototype : `eachi(t, f, ...)` is now `eachi(t, f)`
* Changed prototype : `adjust(t, key, f, ...)` is now `adjust(t, key, f)`
* Changed prototype : `countf(t, f, ...)` is now `countf(t, f)`
* Changed prototype : `map(t, f, ...)` is now `map(t, f)`
* Changed prototype : `reduceBy(t, f, pred, state, ...)` is now `reduceBy(t, f, pred, state)`
* Changed prototype : `select(t, f, ...)` is now `select(t, f)`
* Changed prototype : `reject(t, f, ...)` is now `reject(t, f)`
* Changed prototype : `all(t, f, ...)` is now `all(t, f)`
* Changed prototype : `invoke(t, method, ...)` is now `invoke(t, method)`
* Changed prototype : `min(t, transform, ...)` is now `min(t, transform)`
* Changed prototype : `max(t, transform, ...)` is now `max(t, transform)`
* Changed prototype : `countBy(t, iter, ...)` is now `countBy(t, iter)`
* Changed prototype : `groupBy(t, iter, ...)` is now `groupBy(t, iter)`
* Changed prototype : `selectWhile(array, f, ...)` is now `selectWhile(array, f)`
* Changed prototype : `dropWhile(array, f, ...)` is now `dropWhile(array, f)`
* Changed prototype : `findIndex(array, pred, ...)` is now `findIndex(array, pred)`
* Changed prototype : `findLastIndex(array, pred, ...)` is now `findLastIndex(array, pred)`
* Changed prototype : `chunk(array, f, ...)` is now `chunk(array, f)`
* Changed prototype : `times(iter, n, ...)` is now `times(iter, n)`
* Changed prototype : `template(id, ...)` is now `template(id)`
* Changed prototype : `tap(obj, f, ...)` is now `tap(obj, f)`
* Changed prototype : `result(obj, method, ...)` is now `result(obj, method)`
* Changed prototype : `intersection(array, ...)` is now `intersection(array)`

### Other changes

* Renamed `array` to `tabulate`, with no alias
* Moved `invert` to object functions

### Additions

* 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

## 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`

## 1.6.1 (04/27/17)

* Added `_.array`
* Added `_.clear`
* Added `_.time`
* Added `_.before`

## 1.6.0 (14/04/17)

* Added `_.toObj`
* Added `_.noop`
* Added `_.partialRight`
* Added `_.flip`
* Added `_.overArgs`
* Added `_.over`
* Added `_.overEvery`
* Added `_.overSome`

## 1.5.1 (04/13/17)

* Added `_.curry`
* Added `_.fill`
* Added `.transpose` as an alias to `_.zip`

## 1.5.0 (04/10/17)

#### Additions
* 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`

#### Changes, bugfixes
* 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.


## 1.4.0 (07/14/14)

### Breaking
#### Changes
* 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 of `nil`
* `_.unique` no longer accepts `iter` argument to transform original array values.
* `_.cycle` argument `n` now defaults to 1.
* `_.groupBy` no longer handles `iter` as a string

#### Renamed
* Renamed alias `_.uId` to `_.uid`
* Renamed `_.add` to `_.addTop`
* Renamed `_.uniq` as alias to `_.unique`
* Renamed `_.symmetric_difference` to `_.symmetricDifference`

#### Removed
* Removed `_.paired`

### Improvements & bugfixes
* `_.reduce` now supports an array of booleans
* `_.pick` now picks false values
* `_.concat` args `i` and `j` 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.

### New functions (and aliases)
* 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`

### New aliases
* Added `_.xor` as alias to `_.symmetricDifference`

## 1.3.2.1 (04/22/13)
Renamed global `MOSES_NO_ALIASES` to global `MOSES_ALIASES`. Aliases are not available by default.

## 1.3.2 (04/19/13)
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](http://ruby-doc.org/core-2.0/Enumerable.html#method-i-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

## 1.3.1 (04/12/13)
* 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

## 1.3.0 (11/12/12)
* 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

## 1.2.1 (08/20/12)
* Added `_.takeWhile` (as alias to `_.selectWhile`)
* Added `_.dropWhile` and `_.rejectWhile` (as alias)
* Updated Moses_Lib_Test.lua
* Updated documentation

## 1.2 (08/19/12)
* 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

## 1.1 (08/04/12)
* 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

## 1.0 (08/02/12)
* Added `_.append`, `_.invert`, `_.import`, `_.template`, `_.curry`
* Updated Moses_Lib_Test.lua
* Updated documentation

## 0.1 (07/24/12)
* Initial Release