<div style='font-family:Arial; font-size:13px;'>hi,<div><br></div><div>assigment: make your own element function with the any function.</div><div><br></div><div><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #6a9955;">--elem with any</span></div><div><span style="color: #dcdcaa;">myElemAny</span> :: <span style="color: #569cd6;">Eq</span> <span style="color: #9cdcfe;">a</span> => <span style="color: #9cdcfe;">a</span> -> [<span style="color: #9cdcfe;">a</span>] -> <span style="color: #569cd6;">Bool</span></div><div>myElemAny a = any (== a)</div><br><div><span style="color: #6a9955;">--elem with any</span></div><div><span style="color: #dcdcaa;">myElemAny'</span> :: <span style="color: #569cd6;">Eq</span> <span style="color: #9cdcfe;">a</span> => <span style="color: #9cdcfe;">a</span> -> [<span style="color: #9cdcfe;">a</span>] -> <span style="color: #569cd6;">Bool</span></div><div>myElemAny' a [x]= any (== a) [x]</div></div><br><div><div style="font-family:Arial; font-size:13px;"><br></div></div></div><div style="font-family:Arial; font-size:13px;">myElemAny' compiles but throws an error because it has a non-exhaustive pattern. Could somebody tell me why the list gives the function grieveness?</div><div style="font-family:Arial; font-size:13px;"><br></div><div style="font-family:Arial; font-size:13px;">thanks,</div><div style="font-family:Arial; font-size:13px;"><br></div></div>