Note that I would never (again) use thunk - using such side effects leads to unmaintainable code, at least in my experience.