anchor.diff:                          exit({lasp_process, not_found})
                   end
           end.
  -
  -%% @doc Generate WriteFun.
  -gen_write_fun(Id, WriteFun) ->
  -    fun(Value) ->
  -        WriteFun(Id, Value)
  -    end.
  
positive.code: 
  %% Types
  -type read_fun() :: {atom(), function()}.
  
  %% Records
  -record(state, {read_funs :: [read_fun()], function :: function()}).
  
  %%%===================================================================
  %%% API
  
negative.code:     {ok, ReadFuns, State}.
  
  %% @doc Computation to execute when inputs change.
  process(Args, #state{trans_fun=Function, write_fun=WriteFunction}=State) ->
      case lists:any(fun(X) -> X =:= undefined end, Args) of
          true ->
              ok;
          false ->
              case WriteFunction of
                  undefined -> erlang:apply(Function, Args);
                  {AccId, WFun} ->
                      WFun(AccId, erlang:apply(Function, Args))
              end
      end,
      {ok, State}.
  