Commits

blooper  committed 6a75c54

Answer for problem 4 in Erlang.

very very brute force

  • Participants
  • Parent commits 7bbd6eb

Comments (0)

Files changed (1)

File Erlang/problem004_1.erl

+-module(problem004_1).
+-compile(export_all).
+
+ans() ->
+  List = [ X*Y || X <- lists:seq(100,999), Y <- lists:seq(100,999) ],
+  lists:max(lists:filter(fun is_palindromic/1, List)).
+
+is_palindromic(X) ->
+  integer_to_list(X) == lists:reverse(integer_to_list(X)).