[something(X) || X <- L]- this is an understanding of the list. Lis a list of elements, and this expression creates a list of new elements, forming each element, calling something on it ().
[something(X,Y) || X <-L, Y<-M] , X Y.
[something(X) || X <-L, Expr] - . , , L, Expr X.
[something(X) || {X,..} <-L, Expr] - . , .
, , , , . , , . foreach .
:
1> [ X*2 || X <- [1,2,3] ].
[2,4,6]
2> [ X*Y || X <- [1,2], Y <- [3,4,5] ].
[3,4,5,6,8,10]
3> [ X*3 || X <- [1,2,3,4], X rem 2 == 0 ].
[6,12]
4> [ X || {a,X} <- [{a,1},{a,2},{b,3},{c,4}] ].
[1,2]
, {Pid1a, V1a} PV1a Pid2 P2, , Pid1a Pid2, {delete, V1a} 2.