LeetCode 2678. Number of Senior Citizens in F#

URL

Number of Senior Citizens - LeetCode

Code

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

let countSeniors (details: string list) : int =
    details
    |> List.filter (fun detail -> detail.[11] >= '6' && detail.[12] >= '1')
    |> List.length

// 2
countSeniors [ "7868190130M7522"; "5303914400F9211"; "9273338290F4010" ]

// 0
countSeniors [ "1313579440F2036"; "2921522980M5644" ]