Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
% we need a way to write a values and pass the same back
|
||||
wi is rest link [write, pass]
|
||||
% calculate the neighbors by rotating the array left and right and joining them
|
||||
neighbors is pack [pass, sum [-1 rotate, 1 rotate]]
|
||||
% calculate the individual birth and death of a single array element
|
||||
igen is fork [ = [ + [first, second], 3 first], 0 first, = [ + [first, second], 2 first], 1 first, 0 first ]
|
||||
% apply that to the array
|
||||
nextgen is each igen neighbors
|
||||
% 42
|
||||
life is fork [ > [sum pass, 0 first], life nextgen wi, pass ]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
|loaddefs 'life.nial'
|
||||
|I := [0,1,1,1,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0]
|
||||
|life I
|
||||
Loading…
Add table
Add a link
Reference in a new issue