Open yoshihiro503 opened 5 years ago
In Erlang to Core Erlang conversion, for example [ N * 2 || N <- [1,2,3] ]
is converted to:
letrec lc = fun _1 ->
case _1 of
[N | _2] -> [N * 2 | lc(_2)];
[] -> [];
_ -> error(function_clause)
end
in
lc([1,2,3])
(to see, erlc +to_core list_comprehension.erl && cat list_comprehension.core
)
list comprehension
[E_0 || Q_1, ..., Q_k]