[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conway's Game of Life (cellular automata)



   TLS/HtDP teach that the shape of the program matches the shape of
   the data. Recursion is the way most data is defined, but one has to
   recognize what is recursive.

I like that, Matthias.  What's the shape of the data here?

I've got a rectangular grid of black/white squares, a large chessboard
where the squares can change colors.

I handled that as a recursive list of rows, and each row is a
recursive list of entries.  So I'm seeing the data as a `double
recursion'.  I didn't find that too satisfying, but at least I didn't
have to mutate.