[Haskell-beginners] A game of life implementation
Francesco Ariis
fa-ml at ariis.it
Sun Feb 24 00:34:43 UTC 2019
Hello Michel,
On Sat, Feb 23, 2019 at 04:36:24PM +0100, Michel Haber wrote:
> I am looking for feedback in order to improve my Haskell code on
> all levels. [...]
Minor lint suggestion: why
> main :: IO ()
> main = do
> let size = read input
> let rules = stdRules size
> let initial = map read . words $ start
> let game = advance rules stdNeighbors
> loop game initial
instead of?
> let size = read input
> rules = stdRules size
> initial = map read . words $ start
> game = advance rules stdNeighbors
Other than that, code is readable and clear!
-F
More information about the Beginners
mailing list