F # limit value for seq <obj> but not list <obj>?
1 answer
All bindings are subject to automatic generalization .
Since seq<'T>this is an interface (an alias for IEnumrable), the intended type for myOtherFnwill be
val myOtherFn : ('_a -> unit) when '_a :> seq<obj>
that is common, but myOtherFn is not a function declaration (read the Value Constraint in the link above), therefore automatic generalization cannot deduce that it is the same as val myOtherFn : seq<obj> -> unit.
To force automatic generalization, you can add an explicit parameter to myOtherFnlet myOtherFn args = myFn "" args
+4