One-dimensional cellular automata: Difference between revisions

m
(Add rust's)
Line 2,322:
=={{header|Haskell}}==
<lang haskell>import System.Random (newStdGen, randomRs)
import Control.Applicative (liftA2)
import Data.List (unfoldr)
 
Line 2,345 ⟶ 2,344:
lahmahgaan xs =
init .
until (liftA2 (==) . last <*> (last . init)) ((++) <*> (return . donxt . last)) $
[xs, donxt xs]
 
9,659

edits