erlang / erlang-org

The erlang.org website
https://www.erlang.org
Apache License 2.0
73 stars 52 forks source link

Error in example? #74

Closed door closed 2 years ago

door commented 2 years ago

"Find even numbers" _examples/7-even-numbers.md have this declaration:

-spec even(In) -> even(Out)
  when In :: Out :: list(integer()).

Which compiles with error:

find_even.erl:5:19: type even(_) undefined
%    5| -spec even(In) -> even(Out)
%     |                   ^

find_even.erl:5:24: type variable 'Out' is only used once (is unbound)
%    5| -spec even(In) -> even(Out)
%     |                        ^
garazdawi commented 2 years ago

Thanks for reporting this! Should be fixed now!