
Hi Everyone,
I was going through the classic Hudak paper "Conception, Evolution,
and Application of Functional Programming".
Probably the most valuable part is towards the end where he talks
about how state is represented in Haskell.
On Page 48 of the PDF (page 406 of the ACM Computing survey volume),
he gives the following equations
"For expository purposes we would like to make the state as implicit
as possible, and thus we express the result as a composition of
higher-order functions. To facilitate this and to make the result look
as much like the original program as possible, we define the following
higher-order infix operators and functions":
1 f:=g =\s -> +fs(gs)
2 f;g =\s -> g(fs)=\s-+fs(gs)
3 f;g =\s -> g(fs)
4 goto f = f
5 f+‘g=\s-+fs+gs
6 f<‘g=\s-+fs