Skip to content

Instantly share code, notes, and snippets.

%% nested try...catch
-module(ex).
-export([one/0]).
one() ->
try two() of
ok -> ok
catch _:_ -> ok
end.
@sinasamavati
sinasamavati / ziton.erl
Created February 23, 2014 18:21
Fetcher
-module(ziton).
-export([fetch/2]).
-export([fetch/3]).
%% download content at URI to Path
fetch(URI, Path) ->
ensure_deps_started(),
case httpc:request(URI) of
Error={error, _} ->
-module(lists_vs_proplists).
-export([lists/0]).
-export([proplists/0]).
-define(SIZE, 10).
-define(KEY, ?SIZE - 1).
-define(TIMES, 1000).
lists() ->