LeetCode 2108. Find First Palindromic String in the Array in F#

URL

Find First Palindromic String in the Array - LeetCode

Code

https://github.com/syohex/dotnet-study/tree/master/fsharp/leetcode/challenge/202402/find_first_palindromic_string_in_the_array/main.fsx

let firstPalindrome (words: string list) : string =
    words
    |> List.tryFind (fun s -> Seq.toArray s = (Seq.toArray s |> Array.rev))
    |> Option.defaultValue ""