|
|
|
|
|
by yvdriess
4353 days ago
|
|
This logic oversimplifies: you are making the assumption that a function that talks to the outside world, such as 'read', is the same function at every invocation.
You can deal with outside events (viz. IO) by using and returning a different 'read' function every time. Similarly, you can simulate state by feeding back a state object as an argument to the next invocation. |
|