summaryrefslogtreecommitdiffstats
path: root/src/core/ephraim_util.erl
blob: 73cb7fc0f2a18002c0e65b72f52df267527e7ae4 (plain)
1
2
3
4
5
6
7
8
9
10
-module(ephraim_util).
-compile([debug_info, export_all]).

-spec send_all([term()], term()) -> term().
send_all(Dest, Message) ->
    lists:foldr(fun erlang:send/2, Message, Dest).

-spec send_all_values(dict(), term()) -> term().
send_all_values(Dest, Message) ->
    dict:fold(fun(_,Value,Msg) -> Value ! Msg end, Message, Dest).