This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% nested try...catch | |
-module(ex). | |
-export([one/0]). | |
one() -> | |
try two() of | |
ok -> ok | |
catch _:_ -> ok | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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, _} -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(lists_vs_proplists). | |
-export([lists/0]). | |
-export([proplists/0]). | |
-define(SIZE, 10). | |
-define(KEY, ?SIZE - 1). | |
-define(TIMES, 1000). | |
lists() -> |