Commit graph

27 commits

Author SHA1 Message Date
Kim Alvefur
76d4ce39f5 util.iterators: Use pack from table.pack 2018-12-08 16:36:05 +01:00
Matthew Wild
c65893de6e util.iterators: Add sorted_pairs() method 2018-09-21 14:27:46 +01:00
Matthew Wild
13eab871ba util.iterators: Add join() method and tests 2018-05-18 14:57:39 +01:00
Kim Alvefur
c904d1e28d util: Ignore some Lua 5.1 vs 5.2 compat things [luacheck] 2017-11-10 17:47:11 +01:00
Kim Alvefur
3f87977ddb util.iterators: Add iterator wrapper that works like select(n, ...) applied to original iterator 2016-04-15 13:20:31 +02:00
Kim Alvefur
4bacbb7d71 util.iterators: Normalize indentation 2016-04-13 20:00:41 +02:00
Matthew Wild
6873a62f1e util.iterators: Fix use of incorrect variable accidentally introduced in a9ef93bc81d9 2016-03-21 21:04:14 +00:00
Matthew Wild
cae49b6891 util.iterators: Variable renaming to avoid shadowing [luacheck] 2016-03-10 17:52:57 +00:00
Matthew Wild
e2f3356e24 util.iterators: Return initial var from upstream iterator [luacheck] 2016-03-10 17:49:46 +00:00
Matthew Wild
e5d07c158f util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck] 2016-03-10 17:48:53 +00:00
Kim Alvefur
11ebf4f1dc util.iterators: Use table.pack() on Lua 5.2 2016-02-22 17:43:40 +01:00
Kim Alvefur
a2c0f6d645 util.iterators: Localize unpack() in Lua 5.2 compatible way 2016-02-22 17:38:46 +01:00
Florian Zeitz
1d833bb807 Remove all trailing whitespace 2013-08-09 17:48:21 +02:00
Matthew Wild
f74284d013 util.iterators: Small fix for variable scoping issue 2013-05-17 08:42:21 +01:00
Matthew Wild
d7f5ff243e util.iterators: Add filter() to run results through a filter function 2013-05-17 08:31:03 +01:00
Matthew Wild
61ccc4463d util.iterators: Various fixes and improvements, primarily use pack() where it should be used. 2013-05-17 08:30:28 +01:00
Matthew Wild
8d41687872 util.iterators: Add ripairs() (ipairs() in reverse) (thanks Maranda) 2013-04-12 00:44:49 +01:00
Matthew Wild
92cd4ec3f7 util.iterators: Make a standard library (no longer injects into global namespace) 2012-01-23 00:00:10 +00:00
Matthew Wild
0356027c05 util.iterators: it2table: Fix variable name 2011-12-07 05:17:39 +00:00
Matthew Wild
40a31d93d6 util.iterators: Add range(from, to) 2011-09-25 00:20:43 +01:00
Waqas Hussain
b7e51a203d Monster whitespace commit (beware the whitespace monster). 2010-10-16 23:00:42 +05:00
Matthew Wild
9a9e9b1c1a util.iterators: Add skip() to skip the first n items of an iterator 2010-07-20 12:37:28 +01:00
Matthew Wild
2bc0606453 Update copyright headers for 2010 2010-03-22 17:06:15 +00:00
Matthew Wild
e58d6d5d62 util.iterators: Add tail() iterator, to return the last n items 2009-08-10 15:46:34 +01:00
Matthew Wild
bcb552cdc4 util.iterators: Add head() iterator, to return the first n items 2009-08-10 15:07:32 +01:00
Matthew Wild
e45610ce6e Add copyright header to those files missing one 2009-07-10 03:08:38 +01:00
Matthew Wild
996a74ba94 util.iterators: New iterators library 2009-03-25 03:01:10 +00:00