Commit Graph

18 Commits

Author SHA1 Message Date
Alvaro Frias Garay
5ed6d68f6c added binary search to insert_sorted
Added method tablex.is_sorted
2021-04-15 21:09:04 -03:00
Max Cahill
16c183ec31 [added] tablex.take_random which is like pick_random but removes the element 2021-03-09 20:07:41 +11:00
Max Cahill
24bcc78616 [added] tablex.append_inplace and tablex.append can both take variable numbers of tables 2021-03-05 12:07:28 +11:00
Max Cahill
5f124be2f0 [added] tablex.trim to trim a table to a certain length 2020-08-24 20:54:43 +10:00
Max Cahill
18d02434a0 [added] tablex.flatten as an alias for collapse 2020-07-02 17:04:47 +10:00
Max Cahill
284856d2c3 [modified] refactored init.lua extensively; used new assert module in stringx and tablex 2020-05-19 12:03:45 +10:00
Max Cahill
f183a1a485 [fixed] a few wrong assert strings 2020-05-12 14:14:08 +10:00
Max Cahill
b91f4f1fcc [added] tablex.collapse to reduce the dimensionality of a table; caveats on some edge case behaviour documented 2020-04-29 20:57:05 +10:00
Max Cahill
e75147ec77 [modified] moved tablex.stringify to stringx.pretty 2020-04-17 10:45:15 +10:00
Max Cahill
6bf6113dc2 [added] quoted strings in tablex.stringify; todo consider moving it to stringx actually, as it works for non-table types, maybe as stringx.pretty... 2020-04-17 10:34:39 +10:00
Max Cahill
d445c170e1 [added] tablex.insert_sorted (does what you'd expect, though no binary search yet) 2020-04-14 21:52:33 +10:00
Max Cahill
7922cd3912 [modified] table.push and table.unshift return the table for possible chaining 2020-04-14 13:53:10 +10:00
Max Cahill
b570ea7096 [added] tablex.front and tablex.key_of 2020-04-10 14:14:15 +10:00
Max Cahill
a87380f43c [modified] moved dedupe from functional to tablex 2020-04-08 21:18:52 +10:00
Max Cahill
f214be9f59 [added] tostring awareness for tablex.stringify 2020-04-08 21:10:24 +10:00
Max Cahill
c191a7b4f6 [fixed] issue loading tablex without love 2020-04-08 20:51:16 +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