Conway's Game of Life: Difference between revisions

Content added Content deleted
(→‎APL: Added GNU APL version, John Scholes (ex. 2))
Line 1,404: Line 1,404:


=={{header|APL}}==
=={{header|APL}}==
GNU APL


(from Wikipedia: https://aplwiki.com/wiki/John_Scholes%27_Conway%27s_Game_of_Life#Translations)<syntaxhighlight lang="apl">
Life←{↑↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
m ← 5 5⍴(0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0)
m
0 0 0 0 0
0 0 0 0 0
0 1 1 1 0
0 0 0 0 0
0 0 0 0 0
Life m
0 0 0 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 0 0 0

</syntaxhighlight>


[http://www.dyalog.com/dfnsdws/c_life.htm APL2 (Dyalog) Example in one line]
[http://www.dyalog.com/dfnsdws/c_life.htm APL2 (Dyalog) Example in one line]