add examples for lua

This commit is contained in:
hxsf 2017-03-28 16:25:52 +08:00
parent 8c8afc407d
commit 25b3ef0417
2 changed files with 31 additions and 3 deletions

View File

@ -1,5 +1,19 @@
-- Ensure that that the element at i is in the right position,
-- and return a closure which can be used for continuing the sort.
local a = 'a b c'
local b = '12345678'
local c = 'a b c' + 'a b c'
local t = {
a = 1,
b = 2,
c = 3,
}
local e = {a = 1, b = 2}
function aaa(a, b, c)
return a + b
end
function quicksorter(i, vec, low, high)
if low >= high then
return quicksorter

View File

@ -1,5 +1,19 @@
-- Ensure that that the element at i is in the right position,
-- and return a closure which can be used for continuing the sort.
local a= 'a b c'
local b ='12345678'
local c = 'a b c' +'a b c'
local t = {
a = 1,
b =2 ,
c= 3,
}
local e={a=1,b=2}
function aaa(a,b,c)
return a+b
end
function quicksorter(i, vec, low, high)
if low >= high then
return quicksorter