Attempting to write spec for impure functions is hard.