Erlang重复

-module(helloworld). 
-export([duplicate/2,start/0]). 

duplicate(0,_) -> 
   []; 
duplicate(N,Term) when N > 0 ->
   io:fwrite(~w,~n,[Term]),
   [Term|duplicate(N-1,Term)]. 
start() -> 
   duplicate(5,1).

相关文章

-module(helloworld). -export([start/0]). start() ->...
-module(helloworld). -export([start/0]). start() ->...
-module(helloworld). -export([start/0]). start() ->...
-module(helloworld). -export([start/0]). start() ->...
-module(helloworld). -export([add/2,start/0]). add(X,...
% Erlang整数 -module(helloworld). -export([start/0]). ...