anchor.diff:              {nil, State3};
           false ->
               RPSFun = fun (S) -> {undefined, S} end,
  -            looprun(ProcNum, TimeFun, Iterator, Spawn, {constant, RPSFun}, Body, WorkerProvider, State3, Env);
  +            looprun(ProcNum, TimeFun, Iterator, Spawn, #const_rate{rate_fun = RPSFun}, Body, WorkerProvider, State3, Env);
           #operation{args = [#constant{value = _, units = _} = RPS]} ->
               RPSFun = Evaluator(RPS),
  -            looprun(ProcNum, TimeFun, Iterator, Spawn, {constant, RPSFun}, Body, WorkerProvider, State3, Env);
  +            looprun(ProcNum, TimeFun, Iterator, Spawn, #const_rate{rate_fun = RPSFun}, Body, WorkerProvider, State3, Env);
           #operation{args = [#operation{name = think_time,
                                         args = [#constant{units = _} = Rate,
                                                 #constant{units = _} = ThinkTime]}]} ->
  
positive.code:         {_, NewState} ->
              [PRateFun, PTimeFun | Tail] = Rates,
              LocalStart = msnow(),
              looprun(N, PTimeFun, Iterator, Spawn, {constant, PRateFun}, Body, WorkerProvider, NewState, Env),
              LoopTime = msnow() - LocalStart,
              NewTimeFun =
                  fun (S) ->
  
negative.code:     {Params, NextState} = eval_expr(Args, State, Env, WorkerProvider),
      apply(mzb_stdlib, Name, [NextState, Env, Meta | Params]).
  
  -record(const_rate, {rate_fun, prev_value = undefined}).
  -record(linear_rate, {from_fun, to_fun, prev_from, prev_to}).
  
  -spec eval_loop([proplists:property()], [script_expr()], worker_state(), worker_env(), module())
      -> {script_value(), worker_state()}.
  eval_loop(LoopSpec, Body, State, Env, WorkerProvider) ->
  