anchor.diff:          MappedResult
       end, pmap(fun(Element) -> Fun(Element) end, Elements)).
   
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% Foldls the list until Fun returns {halt, Term}.
  +%% The return value for Fun is expected to be
  +%% {cont, Acc} to continue the fold with Acc as the new accumulator or
  +%% {halt, Acc} to halt the fold and return Acc as the return value of this function
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec foldl_while(F, Accu, List) -> Accu1 when
  +    F :: fun((Elem :: T, AccIn) -> AccOut),
  +    Accu :: term(), Accu1 :: term(),
  +    AccIn :: term(), AccOut :: {cont, term()} | {halt, term()},
  +    List :: [T], T :: term().
  +foldl_while(F, Accu, List) ->
  +    do_foldl(F, {cont, Accu}, List).
  +
  +
   %%%===================================================================
   %%% Internal functions
   %%%===================================================================
  
positive.code: 
  %%--------------------------------------------------------------------
  %% @doc
  %% Foldls the list until Fun returns {halt, Term}.
  %% The return value for Fun is expected to be
  %% {cont, Acc} to continue the fold with Acc as the new accumulator or
  %% {halt, Acc} to halt the fold and return Acc as the return value of this function
  %% @end
  %%--------------------------------------------------------------------
  -spec foldl_while(F, Accu, List) -> Accu1 when
      F :: fun((Elem :: T, AccIn) -> AccOut),
      Accu :: term(), Accu1 :: term(),
      AccIn :: term(), AccOut :: {cont, term()} | {halt, term()},
      List :: [T], T :: term().
  foldl_while(F, Accu, List) ->
      do_foldl(F, {cont, Accu}, List).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% A parallel function similar to lists:filtermap/2.
  %% However, Filter and Map functions are separated and number of parallel
  %% processes is limited.
  %% TODO VFS-7568 use tail recursion
  %% @end
  %%--------------------------------------------------------------------
  -spec pfiltermap(
  
negative.code:     case Length > MaxProcesses of
          true ->
              {L1, L2} = lists:split(MaxProcesses, Elements),
              %% TODO VFS-7568 use tail recursion
              pfiltermap(Fun, L1) ++
              pfiltermap(Fun, L2, MaxProcesses);
          _ ->
  