# Yet another Game of Life implementation

**URL:** https://discourse.elm-lang.org/t/yet-another-game-of-life-implementation/2311
**Category:** Show and Tell
**Created:** [October 22, 2018, 10:44am UTC](https://discourse.elm-lang.org/t/yet-another-game-of-life-implementation/2311 "2018-10-22T10:44:51Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![fizwidget](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/fizwidget/32/920_2.png) [@fizwidget](https://discourse.elm-lang.org/u/fizwidget)
#### Post date: [October 22, 2018, 8:22pm UTC](https://discourse.elm-lang.org/t/yet-another-game-of-life-implementation/2311/4 "2018-10-22T20:22:34Z")

</div>

Thanks for the detailed feedback! 🙂

Very good point about the `Controls` module - your approach greatly simplifies things. I’d been under the impression that defining a `ControlsMsg` type within the module also implied defining `ControlsModel`, `updateControls`, etc, and making it a full-on “component”. I realise now that’s not the case though!

And yup, I probably did go overboard with `|>`. I found the `withoutCmd` util handy in a couple of cases, then used it in all the `update` branches for the sake of consistency (probably not a good justification, as it’s not needed in most of them).

Replacing the `if`/`else` chain with `min`/`max` from `Basics` is also a handy tip. With that change, I’m down to a single `if` expression in the entire program now. I found your thread on the topic quite interesting ([If-then-else versus case expressions](https://discourse.elm-lang.org/t/if-then-else-versus-case-expressions/2273)) - I might use a custom type to remove the remaining `if` 😄

---

_[View the full topic](https://discourse.elm-lang.org/t/yet-another-game-of-life-implementation/2311)._
