Max Cahill
009beadc68
Updated performance note on functional.lua
2021-06-25 13:31:33 +10:00
Max Cahill
6eb979a68c
[fixed] off-by-one in functional.cycle
2021-04-12 16:13:46 +10:00
Max Cahill
4f380d8afe
[added] functional.stitch
and functional.cycle
specialised mapping variants
2021-04-12 13:04:08 +10:00
Max Cahill
b45f606cdf
[fixed] regressions in functional.lua
2020-11-12 13:50:30 +11:00
Max Cahill
a810bf4ce5
[modified] unnecessary use of cached table length for many functions
2020-11-11 13:38:52 +11:00
Max Cahill
715765003d
[modified] moderate functional refactor (BREAKING)
...
- modified functional.reduce signature; takes seed value before function now as this results in much more readable calling code
- added filter_inplace and aliased remap as map_inplace to make semantics more clear
- rewrote many functions to use numeric for as a tiny speed boost at the cost of library code readability
[modified] sequence to be compatible
2020-11-10 20:51:43 +11:00
Max Cahill
a85eec80e2
[added] "canonical" identity function
2020-06-02 15:17:50 +10:00
Max Cahill
8a62f3b19f
[added] functional.generate and generate_2d
2020-05-13 21:09:15 +10:00
Max Cahill
eb428faa6e
[fixed] issue in functional.zip
2020-05-13 21:08:23 +10:00
Max Cahill
e6a59460bd
[modified] functional.remove
renamed to functional.remove_if
, moved functional.group_by
, more documentation added
2020-05-12 09:42:06 +10:00
Jack Robinson
2d24d8e913
[added] add remove which holds onto all elements where f(v) returns false
2020-05-11 21:31:43 +12:00
Jack Robinson
d882127bda
[added] add group-by function to group elements by the return of a provided function
2020-05-11 21:31:43 +12:00
Max Cahill
a87380f43c
[modified] moved dedupe from functional to tablex
2020-04-08 21:18:52 +10:00
Max Cahill
8d5da0a9ff
[modified] moved append and append_inplace from functional to tablex
2020-04-08 20:50:51 +10:00
Max Cahill
6386aaf298
[modified] big refactor to localised modules and require("batteries"):export()
for global usage; renamed files table
to tablex
and math
to mathx
to allow using the library in your module root if you really want to.
2020-04-07 13:49:10 +10:00
Max Cahill
4bbbdf86d6
[modified] functional.lua find_best changed to ipairs and added find_min and find_max better named alternatives
2020-04-04 18:59:40 +10:00
Max Cahill
3674846f11
[added] functional.find_best accepts (ignores) nil results for easy filtering
2020-03-20 22:31:20 +11:00
Max Cahill
66a9f41474
[modified] renamed to batteries, added global export suppression and more documentation
2020-03-15 20:28:50 +11:00
Max Cahill
0dd92b2c2e
[moved] table.copy from functional.lua to table.lua and updated signature a little to allow deep overlays
2020-03-12 21:15:18 +11:00
Max Cahill
6e7cabe9e0
[modified] split sequence and unique_mapping to their own files
...
[added] async to init
2020-01-31 11:56:37 +11:00
Max Cahill
6d4fe84ac1
[modified] sequences use metatable rather than copying from table
2020-01-30 14:58:18 +11:00
Max Cahill
2f470cf7c7
initial commit
2020-01-29 14:26:28 +11:00