-1

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!

kuchu
  • 23
  • 4

1 Answers1

0

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.

7stud
  • 46,922
  • 14
  • 101
  • 127