Skip to content

Comment on Use Haskell for shell scriptingparent

Comments

Then you can do this:

    fmap (either id id) (both ...)
... which is equivalent to:
    x <- both ...
    return (case x of
        Left  txt -> txt
        Right txt -> txt)
That removes the `Either` tag and fuses them into a single stream.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.