Lists Mapping
Lists in Hamler are the same as in Erlang.
Lists in Hamler:
{-- List --}
[] -- empty list
[1,2,3] -- Integer list
[1|[2,3]] -- Cons
[1|[2|[3|[]]]] -- Cons
[x|_] = [1,2,3] -- List pattern
[_|xs] = [1,2,3] -- List pattern
[x|xs] -- Cons
Lists in Erlang:
%% List
[] %% empty list
[1,2,3] %% Integer list
[1|[2,3]] %% Cons
[1|[2|[3|[]]]] %% Cons
[H|_] = [1,2,3] %% List pattern
[_|T] = [1,2,3] %% List pattern
[H|T] %% Cons
当前内容版权归 hamler-lang 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 hamler-lang .