में पैटर्न मिलान के साथ समस्या मैंने एक बूलियन फ़ंक्शन को विघटित करने के लिए उपयोग किए गए फ़ंक्शन को लिखा, समस्या यह है कि संकलन मुझे यह मिलता है: "चेतावनी 5: यह फ़ंक्शन एप्लिकेशन आंशिक है, शायद कुछ तर्क गुम हैं।" मैं इस समस्या को कैसे हल कर सकता हूं? मैं गलत निर्धारित किया है गपशप मिलान या मैंocaml
कोड मिलान पैटर्न के साथ इस कार्रवाई को नहीं चलाया जा सकता है निम्नलिखित:
let rec decomposition state_init state prec formula =
match formula with
And form -> (fun() ->
let f1 = List.hd form in
let f2 = And(List.tl form)in
let new_state = Forms (state_init,f1) in
decomposition state_init new_state state f1;
decomposition state_init new_state state f2;
Hashtbl.add graph new_state (("",false,state :: []) , []) ;
let x = Hashtbl.find graph state in
let succ = state :: snd x in
let (desc,last,ptrs) = fst x in
Hashtbl.replace graph state (("And-node",last,ptrs) , succ))