comparison core/src/luan/modules/Table.luan @ 503:92c3d22745b8

make _ENV optional
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 May 2015 23:24:46 -0600
parents 55f9f74f1e55
children 22bfd8a2eaee
comparison
equal deleted inserted replaced
502:d3183a330ff5 503:92c3d22745b8
1 java() 1 java()
2 local TableLuan = require "java:luan.modules.TableLuan" 2 local TableLuan = require "java:luan.modules.TableLuan"
3 3
4 clone = TableLuan.clone 4 local M = {}
5 concat = TableLuan.concat 5
6 insert = TableLuan.insert 6 M.clone = TableLuan.clone
7 new_property_table = TableLuan.new_property_table 7 M.concat = TableLuan.concat
8 pack = TableLuan.pack 8 M.insert = TableLuan.insert
9 remove = TableLuan.remove 9 M.new_property_table = TableLuan.new_property_table
10 sort = TableLuan.sort 10 M.pack = TableLuan.pack
11 sub_list = TableLuan.sub_list 11 M.remove = TableLuan.remove
12 unpack = TableLuan.unpack 12 M.sort = TableLuan.sort
13 M.sub_list = TableLuan.sub_list
14 M.unpack = TableLuan.unpack
13 15
14 16
15 local Luan = require "luan:Luan" 17 local Luan = require "luan:Luan"
16 local pairs = Luan.pairs 18 local pairs = Luan.pairs
17 19
18 function is_empty(t) 20 function M.is_empty(t)
19 return pairs(t)() == nil 21 return pairs(t)() == nil
20 end 22 end
23
24 return M