मैंने एफ # में मूल्य प्रतिबंध के बारे में सभी ट्रेड पढ़े हैं, लेकिन मुझे अभी भी यह समझ में नहीं आया है।एफ # मूल्य प्रतिबंध
error FS0030: Value restriction. The value 'it' has been inferred to have generic type
val it : '_a list
Either define 'it' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation.
किसी को भी मेरी मदद कर सकते: एक त्रुटि दिखाने
type tree<'a> =
| Nil
| Node of (tree<'a> * 'a * tree<'a>)
let rec flatten = function
| Nil -> []
| Node (Nil, b, Nil) -> [b]
| Node (l, h, p) -> List.concat [(flatten l);[h];(flatten p)]
और संकलक: मैं निम्नलिखित कोड है? बहुत बहुत धन्यवाद;)
क्या आप कोड कॉलिंग फ़्लैटन प्रदान कर सकते हैं? मैं इस नमूना को संकलित और चला सकता हूं ठीक – JaredPar
लेकिन जब मैं फ्लैटन निल को बुलाता हूं ;; वहाँ एक समस्या है। पीडीएस के लिए – 877