Skip to content

Commit

Permalink
added remark about more complicated states
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Nov 17, 2013
1 parent 87193ca commit dc2cbf7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions from_oop_to_fp_-_inheritance_and_the_expression_problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ stepBar s delta = bar $ s ++ show delta
displayBar :: String -> String
displayBar s = s
```
In a real application the state of course could be any arbitrary more complicated data type, and not just an Int or String as in this example.

Our `Main.hs` only has to be changed in one line, since we now have our
constructor functions `foo` and `bar` (instead of `Foo` and `Bar` in the
Expand Down

0 comments on commit dc2cbf7

Please sign in to comment.