A Comparative Study of State Emulation in Functional Programming Languages