diff options
Diffstat (limited to 'test.pez')
| -rw-r--r-- | test.pez | 40 |
1 files changed, 24 insertions, 16 deletions
@@ -1,21 +1,29 @@ -@print: {[x] printf["%a\n", x]} - @Box: {[value] - @it = 0 - ( - @test = 7 - @h2 = 100 - it = #[{value}, - {[new] printf["test: %a\n", test] value = new}] - ) - ( - @hmm = 999 - ) - it + dilambda[ + { value }, + {[new] value = new } + ] } +@Array2d: {[w, h] + @data: array#fill[w * h, 0] + @w = w + dilambda[ + {[x, y] data[x + (y * w)] }, + {[x, y, new] data[x + (y * w)] = new } + ] +} +@print: {[x] printf["x -> %a\n", x] } @x = Box[-7] -print[x[0][]] -x[1]['awesome] -print[x[0][]] +x[] *= 2 +print[x[]] +x[] = 'abcdef +print[x[]] + +@m: Array2d[10, 10] +FOR [@x: 0][< 10][+ 1] + FOR [@y: 0][< 10][+ 1] + m[x, y] = x ^ y + +printf["%a == %a\n", m[3,7], 3^7] |