Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thank you for pointing this out, I was not aware that the word could be used this way. They are really quite different concepts.


I'm not sure that they are. You just need to model the concept of state as the function's input/output, as functional programmers are eager to do :)

If we start in state x, then apply operation f, the resulting state is f(x). If we apply operation f again, we'll be in state f(f(x)). If f is idempotent, then state f(x) and state f(f(x)) are identical.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: