Dialyzer Warnings in erlang, Records construction and improper lists

Multi tool use
Multi tool use


Dialyzer Warnings in erlang, Records construction and improper lists



I am trying to fix the warnings in erlang code found from dialyzer. i came across few errors like record construction and improper lists what causes these errors. can anyone explain it.



thank you!





can you show dialyzer errors and the code (some lines) that errors come from?
– Pouriya
Jul 1 at 21:18




1 Answer
1



Proper list:


[1|[2]]



Improper list:


[1|2]



...which could result from defining a function like this:


f([H|]) -> H-1;
f([H|T]) -> [H - 1 | f(T) ].



instead of:


f([H|]) -> [H-1];
f([H|T]) -> [H - 1 | f(T) ].



Record construction error:



http://erlang.org/pipermail/erlang-questions/2013-June/074118.html.



I do not get that record construction error in erlang 20.2.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

jyefQzu3YcZWieN,j
7fRT5S3lp ax40 NHlWAw NGtO,j

Popular posts from this blog

Rothschild family

Cinema of Italy