<p dir="ltr">Try pattern matching on the list head and tail as in (x:xs). Take a look at the source code for filter [1], which can be put to use here.</p>
<p dir="ltr">[1]: <a href="http://hackage.haskell.org/package/base-4.8.2.0/docs/src/GHC.List.html#filter">http://hackage.haskell.org/package/base-4.8.2.0/docs/src/GHC.List.html#filter</a></p>
<p dir="ltr">Regards,<br>
  Sumit</p>
<div class="gmail_quote">On 09-May-2016 9:41 am, "Anvika Kumar" <<a href="mailto:anvikakumar93@gmail.com">anvikakumar93@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a tuple with three values and i want to remove the tuple which contains a particular name. <div><br></div><div>So d = (name, month, date)</div><div> i take a user input of name and then search the list which has tuples of the above declared type. Which ever tuple has the name it should be deleted from the list.</div><div> </div><div>d is the tuple.</div><div>db should be a list of tuples.</div><div><br></div><div><br></div><div><div>remove :: (Eq) =>  IO String  -> d</div><div>print "Enter the name to be removed”</div><div>a <- getLine</div><div>      remove x [] = []</div><div>      print “Record not found”</div><div>      remove x db = </div><div>         if x == </div></div><div><br></div><div><br></div><div><br clear="all"><div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Please let me know!</div><div><br></div><div>Thanks a lot</div><div><br></div></div></div></div></div></div>
</div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div>