<div dir="ltr">Let me review and get back. Thank you.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Anvika<div>Graduate Student </div><div>STONY BROOK UNIVERSITY</div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, May 9, 2016 at 6:25 PM, Sumit Sahrawat, Maths & Computing, IIT (BHU) <span dir="ltr"><<a href="mailto:sumit.sahrawat.apm13@iitbhu.ac.in" target="_blank">sumit.sahrawat.apm13@iitbhu.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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"><div><div class="h5">On 09-May-2016 9:41 am, "Anvika Kumar" <<a href="mailto:anvikakumar93@gmail.com" target="_blank">anvikakumar93@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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></div></div>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">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>
<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><br></div>