anchor.diff:  %% Runs a function on X and signals parent that it's done.
   %% @end
   %%--------------------------------------------------------------------
  --spec pforeach_f(Parent :: pid(), Ref :: reference(), Fun :: fun((E :: A) -> any()), X :: A) -> reference().
  -pforeach_f(Parent, Ref, Fun, X) -> catch Fun(X), Parent ! Ref.
  +-spec pforeach_f(Parent :: pid(), Ref :: reference(),
  +    Fun :: fun((E :: A) -> any()), X :: A) -> {reference(),pid()}.
  +pforeach_f(Parent, Ref, Fun, X) -> catch Fun(X), Parent ! {Ref, self()}.
   
   %%--------------------------------------------------------------------
   %% @private
  
positive.code: %% Gathers the results of pmap.
  %% @end
  %%--------------------------------------------------------------------
  -spec pmap_gather(PIDs :: [pid()], Ref :: reference(), Acc :: list()) -> list().
  pmap_gather([], _Ref, Acc) -> lists:reverse(Acc);
  pmap_gather([PID | T], Ref, Acc) ->
      receive
          {PID, Ref, Result} -> pmap_gather(T, Ref, [Result | Acc])
      end.
  
  %%--------------------------------------------------------------------
  
negative.code: %% A parallel version of lists:foreach/2. See {@link lists:foreach/2}
  %% @end
  %%--------------------------------------------------------------------
  -spec pforeach(Fun :: fun((X :: A) -> any()), L :: [A]) -> ok | error.
  pforeach(Fun, L) ->
      Self = self(),
      Ref = erlang:make_ref(),
      Pids = lists:map(fun(X) ->
          spawn(fun() -> pforeach_f(Self, Ref, Fun, X) end)
      end, L),
      pforeach_gather(Pids, Ref).
  
  %%--------------------------------------------------------------------
  %% @doc
  