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:  How to install new GHC ? (Baa)
   2. Re:  IO question (Vale Cofer-Shabica)
   3. Re:  IO question (Vale Cofer-Shabica)
   4. Re:  IO question (Thomas Jakway)


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

Message: 1
Date: Tue, 12 Dec 2017 18:26:43 +0200
From: Baa <aqua...@gmail.com>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] How to install new GHC ?
Message-ID: <20171212182644.23ad578a@Pavel>
Content-Type: text/plain; charset=US-ASCII

@Michael Snoyman: thank you a lot! Yes, absolutely makes sense.


===
Best regards, Paul


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

Message: 2
Date: Tue, 12 Dec 2017 13:41:51 -0500
From: Vale Cofer-Shabica <vale.cofershab...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] IO question
Message-ID:
        <caazfv4ssabrf7he0+c9uay2jqn+0g9j2yzjdaywmfy7jz4o...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Just to add to David's answer, when I find myself in situations like:
foo >>= return . bar

hlint helpfully suggests:
fmap bar foo

So you could also have:
fmap (splitOn ",") $ readFile "data.txt"

-vale

--
vale cofer-shabica
401.267.8253

On Mon, Dec 11, 2017 at 4:24 PM, mike h <mike_k_hough...@yahoo.co.uk> wrote:

> Thank you David.  Before posting I tried readFile "data.txt" >>= … but got
> errors as I didn’t use return.!!
>
> Mike
>
>
>
> On 11 Dec 2017, at 21:00, David McBride <toa...@gmail.com> wrote:
>
> splitOn "," <$> readFile "data.txt"
>
> or perhaps
>
> readFile "data.txt" >>= return . splitOn ","
>
> On Mon, Dec 11, 2017 at 3:56 PM, mike h <mike_k_hough...@yahoo.co.uk>
> wrote:
>
>> I have
>>
>>  input <- readFile “data.txt”
>>  let  input’ = splitOn “,” input
>> ….
>>
>> How do I make that into just one line?
>>
>> Thanks
>>
>> Mike
>> _______________________________________________
>> 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
>
>
>
> _______________________________________________
> 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/20171212/388bfecf/attachment-0001.html>

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

Message: 3
Date: Tue, 12 Dec 2017 13:43:28 -0500
From: Vale Cofer-Shabica <vale.cofershab...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] IO question
Message-ID:
        <caazfv4qjckhxmxrh4osohh7qib-y0lsa5xldhfgt4ccomma...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I now, of course, feel silly because <$> is the infix version of fmap;
apologies for list-spamming.

-vale

--
vale cofer-shabica
401.267.8253

On Tue, Dec 12, 2017 at 1:41 PM, Vale Cofer-Shabica <
vale.cofershab...@gmail.com> wrote:

> Just to add to David's answer, when I find myself in situations like:
> foo >>= return . bar
>
> hlint helpfully suggests:
> fmap bar foo
>
> So you could also have:
> fmap (splitOn ",") $ readFile "data.txt"
>
> -vale
>
> --
> vale cofer-shabica
> 401.267.8253 <(401)%20267-8253>
>
> On Mon, Dec 11, 2017 at 4:24 PM, mike h <mike_k_hough...@yahoo.co.uk>
> wrote:
>
>> Thank you David.  Before posting I tried readFile "data.txt" >>= … but
>> got errors as I didn’t use return.!!
>>
>> Mike
>>
>>
>>
>> On 11 Dec 2017, at 21:00, David McBride <toa...@gmail.com> wrote:
>>
>> splitOn "," <$> readFile "data.txt"
>>
>> or perhaps
>>
>> readFile "data.txt" >>= return . splitOn ","
>>
>> On Mon, Dec 11, 2017 at 3:56 PM, mike h <mike_k_hough...@yahoo.co.uk>
>> wrote:
>>
>>> I have
>>>
>>>  input <- readFile “data.txt”
>>>  let  input’ = splitOn “,” input
>>> ….
>>>
>>> How do I make that into just one line?
>>>
>>> Thanks
>>>
>>> Mike
>>> _______________________________________________
>>> 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
>>
>>
>>
>> _______________________________________________
>> 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/20171212/862e3785/attachment-0001.html>

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

Message: 4
Date: Tue, 12 Dec 2017 13:44:24 -0500
From: Thomas Jakway <tjak...@nyu.edu>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] IO question
Message-ID:
        <caczqfy8djesr07ls3s-eycmt_mo-bqxx7axa8jzzawudbmu...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Personally I prefer <$> (infix fmap) to fmap, but is this confusing to
beginners?

On Dec 12, 2017 10:42 AM, "Vale Cofer-Shabica" <vale.cofershab...@gmail.com>
wrote:

> Just to add to David's answer, when I find myself in situations like:
> foo >>= return . bar
>
> hlint helpfully suggests:
> fmap bar foo
>
> So you could also have:
> fmap (splitOn ",") $ readFile "data.txt"
>
> -vale
>
> --
> vale cofer-shabica
> 401.267.8253 <(401)%20267-8253>
>
> On Mon, Dec 11, 2017 at 4:24 PM, mike h <mike_k_hough...@yahoo.co.uk>
> wrote:
>
>> Thank you David.  Before posting I tried readFile "data.txt" >>= … but
>> got errors as I didn’t use return.!!
>>
>> Mike
>>
>>
>>
>> On 11 Dec 2017, at 21:00, David McBride <toa...@gmail.com> wrote:
>>
>> splitOn "," <$> readFile "data.txt"
>>
>> or perhaps
>>
>> readFile "data.txt" >>= return . splitOn ","
>>
>> On Mon, Dec 11, 2017 at 3:56 PM, mike h <mike_k_hough...@yahoo.co.uk>
>> wrote:
>>
>>> I have
>>>
>>>  input <- readFile “data.txt”
>>>  let  input’ = splitOn “,” input
>>> ….
>>>
>>> How do I make that into just one line?
>>>
>>> Thanks
>>>
>>> Mike
>>> _______________________________________________
>>> 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
>>
>>
>>
>> _______________________________________________
>> 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/20171212/fff5d40f/attachment.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 114, Issue 21
******************************************

Reply via email to