[Haskell-beginners] A game of life implementation
Michel Haber
michelhaber1994 at gmail.com
Sun Feb 24 17:35:44 UTC 2019
Thanks Francesco,
I will correct this.
Any ideas for improvements on other levels?
Michel:)
On Sun, Feb 24, 2019 at 1:35 AM Francesco Ariis <fa-ml at ariis.it> wrote:
> 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
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20190224/1b9ba58d/attachment.html>
More information about the Beginners
mailing list