dialyzer: will it ever catch out of bounds errors like this?

Roger Larsson roger.larsson@REDACTED
Thu Jun 22 23:25:46 CEST 2006

-export([wrong/0, harder/1]).

wrong() -> lists:nth(4, [1, 2, 3]).

triple(X) -> lists:duplicate(3, X).
harder(X) -> lists:nth(4, triple(X)).

As wanted in "The Next Mainstream Programming Language"
(Haskell for Next Generation Games)


More information about the erlang-questions mailing list