[Haskell-cafe] Ported a Python script for use with Go to Haskell

Matt Joiner anacrolix at gmail.com
Sat Apr 5 11:23:09 UTC 2014


Thanks very much. I'll look into fmap and <$>.
On 05/04/2014 9:21 pm, "Robert Vollmert" <rvollmert-lists at gmx.net> wrote:

>
> On Apr 5, 2014, at 8:32 , Matt Joiner <anacrolix at gmail.com> wrote:
> > It's been 3 years since my last attempt to use Haskell. I've ported a
> script from Python, I wonder if anyone might point out areas that I'm not
> doing things idiomatically for Haskell? I'm hoping to start using Haskell
> more in place of Go and Python.
>
> Hardly an expert here, but a couple of remarks:
>
> - try using ‘span’ (Prelude) for splitting the argument list
> - clobbering the environment by prepending to an association list makes me
> wonder if that’s really what happens when the variable is already defined
> - 'fmap rstrip (readProcess …)’ or ‘rstrip <$> readProcess …’ instead of
> ‘readProcess … >>= return . rstrip’
>
> It does look like Haskell to my eyes.
>
> Cheers
> Rob
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140405/8360f18f/attachment.html>


More information about the Haskell-Cafe mailing list