Jump to content

Elementary cellular automaton/Infinite length: Difference between revisions

m
m (julia example)
Line 445:
=={{header|Julia}}==
{{trans|Python}}
<lang julia>notcell(cell) =function ecainfinite(cellcells, ==rule, '1'n) ? '0' : '1'
notcell(cell) = (cell == '1') ? '0' : '1'
 
function ecainfinite(cells, rule, n)
celllength = length(cells)
rulebits = reverse(string(rule, base = 2, pad = 8))
4,107

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.