How to constrain one type parameter by another

No :(. This is one of the most unfortunate limitations of F# at the moment (in my opinion). See the Solving Subtype Constraints section of the spec, which states that New constraints of the form type :> ‘b are solved again as type=”b. This is really a shame since otherwise we could work around F#”s … Read more

F# : not sure how to start [closed]

3. type Line = {a:double; b:double} let LinesIntersection x y = if x.a <> y.a then Some ((x.b – y.b)/(y.a – x.a), (y.a*x.b – x.a*y.b)/(y.a – x.a)) else None let l1 = {a = 2.0; b = -3.0} let l2 = {a = -3.0; b = 2.0} let l3 = {a = 2.0; b = … Read more