Skip to content

Instantly share code, notes, and snippets.

@sargun
Forked from marksteele/gist:e2a09eb2d0555f9e7030
Last active August 29, 2015 14:10
Show Gist options
  • Save sargun/87cd5e568efd715c4d1e to your computer and use it in GitHub Desktop.
Save sargun/87cd5e568efd715c4d1e to your computer and use it in GitHub Desktop.
%% State#state.users contains a riak_dt_orswot that's a list of online users,
%% How to transform the following into working code?
handle_handoff_command(?FOLD_REQ{foldfun=Fun, acc0=Acc0}, _Sender, State) ->
Acc = lists:foldl(Fun, Acc0, [State#state.users]),
{reply, Acc, State}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment