Skip to content

Instantly share code, notes, and snippets.

@dcolthorp
Created February 24, 2017 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcolthorp/18344f7e586c495f5a7aa6ea55e34370 to your computer and use it in GitHub Desktop.
Save dcolthorp/18344f7e586c495f5a7aa6ea55e34370 to your computer and use it in GitHub Desktop.
This paragraph breaks Bear (markdown compatibility mode)

C#, unfortunately, still does not have convenient ways of creating immutable classes with a convenient copy-and-update mechanism, deep equality semantics, and a sensible GetHashCode implementation. (And this was cut from C#= 7. 😢) By representing our state with structs, our action handlers can be written conveniently as

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment