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: IO question (David McBride) 2. Re: How to install new GHC ? (Fabien R) ---------------------------------------------------------------------- Message: 1 Date: Tue, 12 Dec 2017 13:48:01 -0500 From: David McBride <toa...@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: <can+tr42vqmttvhz-bsfy-t0pnt-lbnkxg_92yutdnwl_h36...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" No worries. I definitely should have mentioned fmap and <$> are the same. On Tue, Dec 12, 2017 at 1:43 PM, Vale Cofer-Shabica < vale.cofershab...@gmail.com> wrote: > I now, of course, feel silly because <$> is the infix version of fmap; > apologies for list-spamming. > > -vale > > -- > vale cofer-shabica > 401.267.8253 <(401)%20267-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 >>> >>> >> > > _______________________________________________ > 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/563aabe5/attachment-0001.html> ------------------------------ Message: 2 Date: Wed, 13 Dec 2017 11:30:23 +0100 From: Fabien R <theedge...@free.fr> To: beginners@haskell.org Subject: Re: [Haskell-beginners] How to install new GHC ? Message-ID: <ca3745aa-e633-68a7-d61e-01e0446d6...@free.fr> Content-Type: text/plain; charset=utf-8 For debian users, these instructions [1] install ghc from scratch (I used the cabal part). [1] https://gist.github.com/yantonov/10083524 -- Fabien ------------------------------ 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 22 ******************************************