For example, I would like to find a tuple with a minimum date. I tried this
let dateRange2 (prices: seq<System.DateTime * float>) =
let tupleWithMinDate = prices |> Seq.min(fun (date, _) -> date)
tupleWithMinDate
Get the red squiggly under the entire right of the conveyor operator. He says: “Type” (seq <System.DateTime * float> → 'a)' does not support the 'comparison' constraint. For example, it does not support the System.IComparable interface
Not sure if returning a typical type is part of the problem - I assumed that Seq.min will know that it returns the type from which the sequence is executed.
source
share