Re: [NTG-context] Lua to Context Table

2014-08-02 Thread John Kitzmiller
> On Aug 2, 2014, Aditya Mahajan wrote: >> On Sat, 2 Aug 2014, luigi scarso wrote: >>> On Sat, Aug 2, 2014, John Kitzmiller wrote: >>> Here is Lua code that prints the first nine fibonacci numbers: >>> >>> local function fib(n) >>> f={1,1} >>> ...the Wiki entries, CLD, and tried Aditya's metho

Re: [NTG-context] Lua to Context Table

2014-08-01 Thread Aditya Mahajan
On Sat, 2 Aug 2014, luigi scarso wrote: On Sat, Aug 2, 2014 at 12:59 AM, John Kitzmiller wrote: Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} for i=3,9 do f[i]=f[i-1]+f[i-2] end return(f[n]) end for n=1,9 do print(fib(n)) end Here i

Re: [NTG-context] Lua to Context Table

2014-08-01 Thread luigi scarso
On Sat, Aug 2, 2014 at 12:59 AM, John Kitzmiller wrote: > Here is Lua code that prints the first nine fibonacci numbers: > > local function fib(n) > f={1,1} > for i=3,9 do > f[i]=f[i-1]+f[i-2] > end > return(f[n]) > end > for n=1,9 do print(fib(n)) end > > Here is Context+Lua that pri

[NTG-context] Lua to Context Table

2014-08-01 Thread John Kitzmiller
Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} for i=3,9 do f[i]=f[i-1]+f[i-2] end return(f[n]) end for n=1,9 do print(fib(n)) end Here is Context+Lua that prints 3 x 3 table of the first nine natural numbers: \starttext \setupTABLE[each]