Erlang Check Palindrome
-module(check_palindrome).
-export([check_palindrome/1]).
check_palindrome(InputString) ->
lists:reverse(InputString) =:= InputString.
This compares the string with its reverse. If they match, it is a palindrome.
-module(check_palindrome).
-export([check_palindrome/1]).
check_palindrome(InputString) ->
lists:reverse(InputString) =:= InputString.
This compares the string with its reverse. If they match, it is a palindrome.