Help for type annotation (seq of tuples)

beginners

#1

I have a function working fine, defined without type annotation:

let expensesGroupBarGraph s =

I wanted to add a type annotation for the argument s, which is a sequence of tuples with the first tuple member being a string, and the second tuple member being of type ExpensesSummary. (Don’t hesitate to point me to the documentation if I missed the place it is explained).

I tried this without success

let expensesGroupBarGraph (s:Seq<(string,ExpensesSummary)>) =

I’m working in Jupyter and get this error:

Unexpected symbol '>' in type arguments
Expected type argument or static argument
Unexpected start of structured construct in type arguments. Expected ',' or other token.
Expected type argument or static argument
Unexpected symbol '->' in binding. Expected '=' or other token.
Incomplete structured construct at or before this point in interaction. Expected incomplete structured construct at or before this point, ';', ';;' or other token.
parse error

Thanks in advance!


#2

let expensesGroupBarGraph (s: (string * ExpensesSummary) seq) =


#3

It could also be written as:

let expensesGroupBarGraph (s: seq<string * ExpensesSummary>) =