Packages

An OTP library: Erlang Commons like Apache Commons.

Current section

Files

Jump to
erlang_commons src erlang_commons.erl
Raw

src/erlang_commons.erl

-module(erlang_commons).
%% API exports
-export([for/3]).
%%====================================================================
%% API functions
%%====================================================================
% 自定义for循环
for(Max, Max, F) -> [F(Max)];
for(I, Max, F) -> [F(I) | for((I+1), Max, F)].
%%====================================================================
%% Internal functions
%%====================================================================