Skip to content

Instantly share code, notes, and snippets.

Last active September 6, 2018 11:27
What would you like to do?
def handle_call(:get_history, _from, worker) do
sortedLog = Enum.sort_by(worker.eventLog, fn event -> {event.time, event.origin} end)
{:reply, sortedLog, worker}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment