Skip to content

Instantly share code, notes, and snippets.

View redink's full-sized avatar

taotao redink

  • Sunnyvale
  • 05:07 (UTC -07:00)
View GitHub Profile
-module(gen_server_call_timeout).
%% API
-behaviour(gen_server).
%% API
-export([start/0]).
-export([run/2]).
-export([multi_run/0]).
-export([i/0]).
@redink
redink / test.erl
Last active July 27, 2016 07:36 — forked from pichi/test.erl
Find top n items in a unordered list
-module(test).
-compile(export_all).
%% API
-compile({inline, [ insert/2
, merge/2
]}).
insert(E, []) -> [E];
insert(E, [E2|_] = H) when E =< E2 -> [E, H];