%% b.erl
-module(b).
-export([x/0]).
-export([test/1]).
x() -> 20000.
y() ->
io:format("Vsn1 (~p) b:x() = ~p~n", [1, 2]).
test(Count) ->
[y() || _ <- lists:seq(1,Count)].
[y() || _ <- lists:seq(1,Count)].
4> b:test(10).
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
Vsn1 (1) b:x() = 2
[ok,ok,ok,ok,ok,ok,ok,ok,ok,ok]
1> lists:seq(1,10).
[1,2,3,4,5,6,7,8,9,10]
2>
2> [A|B]<-lists:seq(1,10).
* 2: syntax error before: '<-'
2>
2> [A|B] = lists:seq(1,10).
[1,2,3,4,5,6,7,8,9,10]
3>
3> A.
1
4> B.
[2,3,4,5,6,7,8,9,10
.............................
13> L=[1,2,3].
[1,2,3]
14> [2*X || X <- L].
[2,4,6]