Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Simple function gives UTF-8 decoding error. (Vilpesh Mistry)
   2.  searching for an element from a list of tuples (Anvika Kumar)
   3. Re:  searching for an element from a list of      tuples
      (Sumit Sahrawat, Maths & Computing, IIT (BHU))
   4. Re:  searching for an element from a list of      tuples (Anvika Kumar)


----------------------------------------------------------------------

Message: 1
Date: Sun, 8 May 2016 23:34:11 +0530
From: Vilpesh Mistry <vilp...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Simple function gives UTF-8 decoding
        error.
Message-ID:
        <CAH5zO6RSf25hqO3eGBPSaX8bG3YVrcx7Ge77zO=duajlc-q...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Yes, ? in ?lem was the problem, thanks for pointing that out.
Vilpesh

On Sun, May 8, 2016 at 9:04 PM, Imants Cekusins <ima...@gmail.com> wrote:

> ? in ?lem?
> ?
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>


-- 
thanks
Vilpesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160508/04002e98/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 9 May 2016 13:11:01 +0900
From: Anvika Kumar <anvikakuma...@gmail.com>
To: beginners@haskell.org
Subject: [Haskell-beginners] searching for an element from a list of
        tuples
Message-ID:
        <CAAtXpCeFCtX_=CW1=kx4D6B9cuOnff-2h=-1OT0TeRuagkx=t...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I have a tuple with three values and i want to remove the tuple which
contains a particular name.

So d = (name, month, date)
 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.

d is the tuple.
db should be a list of tuples.


remove :: (Eq) =>  IO String  -> d
print "Enter the name to be removed?
a <- getLine
      remove x [] = []
      print ?Record not found?
      remove x db =
         if x ==



Please let me know!

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160509/806180fd/attachment-0001.html>

------------------------------

Message: 3
Date: Mon, 9 May 2016 14:55:18 +0530
From: "Sumit Sahrawat, Maths & Computing, IIT (BHU)"
        <sumit.sahrawat.ap...@iitbhu.ac.in>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] searching for an element from a list
        of      tuples
Message-ID:
        <cajbew8nhwbcmextak44ippukbimetim2puciuiz5hj+kthq...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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.

[1]:
http://hackage.haskell.org/package/base-4.8.2.0/docs/src/GHC.List.html#filter

Regards,
  Sumit
On 09-May-2016 9:41 am, "Anvika Kumar" <anvikakuma...@gmail.com> wrote:

> I have a tuple with three values and i want to remove the tuple which
> contains a particular name.
>
> So d = (name, month, date)
>  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.
>
> d is the tuple.
> db should be a list of tuples.
>
>
> remove :: (Eq) =>  IO String  -> d
> print "Enter the name to be removed?
> a <- getLine
>       remove x [] = []
>       print ?Record not found?
>       remove x db =
>          if x ==
>
>
>
> Please let me know!
>
> Thanks a lot
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160509/c68ebb30/attachment-0001.html>

------------------------------

Message: 4
Date: Mon, 9 May 2016 21:02:49 +0900
From: Anvika Kumar <anvikakuma...@gmail.com>
To: sumit.sahrawat.ap...@iitbhu.ac.in,  The Haskell-Beginners Mailing
        List - Discussion of primarily beginner-level topics related to
        Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] searching for an element from a list
        of      tuples
Message-ID:
        <CAAtXpCdz9WFH1YpmufRt=d+q4-lqurbm970+yv3n+zjuyg7...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Let me review and get back. Thank you.

Anvika
Graduate Student
STONY BROOK UNIVERSITY

On Mon, May 9, 2016 at 6:25 PM, Sumit Sahrawat, Maths & Computing, IIT
(BHU) <sumit.sahrawat.ap...@iitbhu.ac.in> wrote:

> 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.
>
> [1]:
> http://hackage.haskell.org/package/base-4.8.2.0/docs/src/GHC.List.html#filter
>
> Regards,
>   Sumit
> On 09-May-2016 9:41 am, "Anvika Kumar" <anvikakuma...@gmail.com> wrote:
>
>> I have a tuple with three values and i want to remove the tuple which
>> contains a particular name.
>>
>> So d = (name, month, date)
>>  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.
>>
>> d is the tuple.
>> db should be a list of tuples.
>>
>>
>> remove :: (Eq) =>  IO String  -> d
>> print "Enter the name to be removed?
>> a <- getLine
>>       remove x [] = []
>>       print ?Record not found?
>>       remove x db =
>>          if x ==
>>
>>
>>
>> Please let me know!
>>
>> Thanks a lot
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160509/726b7ba9/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 95, Issue 14
*****************************************

Reply via email to