From f30e9c4c04cfd42e3b0579a686709f71a5fa3713 Mon Sep 17 00:00:00 2001 From: Dineshkumar S <40620249+dinx6@users.noreply.github.com> Date: Wed, 21 Apr 2021 12:27:47 +0530 Subject: [PATCH] Create isPalindrome --- isPalindrome | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 isPalindrome diff --git a/isPalindrome b/isPalindrome new file mode 100644 index 0000000..f6678fd --- /dev/null +++ b/isPalindrome @@ -0,0 +1,14 @@ +namespace Algorithms.Strings + +module IsPalindrome = + /// + /// Determine whether the string is palindrome + /// + let isPalindrome (str: string): bool = + let str = + str.ToLower() + |> Seq.filter (System.Char.IsLetterOrDigit) + |> Seq.toList + + + str = (str |> List.rev)