<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you David. Before posting I tried readFile "data.txt" >>= … but got errors as I didn’t use return.!! <div class=""><br class=""></div><div class="">Mike<br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 11 Dec 2017, at 21:00, David McBride <<a href="mailto:toad3k@gmail.com" class="">toad3k@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">splitOn "," <$> readFile "data.txt"<br class=""><br class=""></div>or perhaps<br class=""><br class=""></div>readFile "data.txt" >>= return . splitOn ","<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Dec 11, 2017 at 3:56 PM, mike h <span dir="ltr" class=""><<a href="mailto:mike_k_houghton@yahoo.co.uk" target="_blank" class="">mike_k_houghton@yahoo.co.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have<br class="">
<br class="">
input <- readFile “data.txt”<br class="">
let input’ = splitOn “,” input<br class="">
….<br class="">
<br class="">
How do I make that into just one line?<br class="">
<br class="">
Thanks<br class="">
<br class="">
Mike<br class="">
______________________________<wbr class="">_________________<br class="">
Beginners mailing list<br class="">
<a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank" class="">http://mail.haskell.org/cgi-<wbr class="">bin/mailman/listinfo/beginners</a><br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br class=""></div></blockquote></div><br class=""></div></div></body></html>