LeetCode 1822. Sign of the Product of an Array in F#
let arraySign (nums: int list) : int =
if List.exists ((=) 0) nums then
0
else
let negatives =
nums |> List.filter ((>) 0) |> List.length
if negatives % 2 = 0 then 1 else -1