Fork me on GitHub
#funcool
<
2018-08-29
>
mping07:08:39

I believe I would need support for flatmap besides bind

mping07:08:13

In order to flatten nested try

mping09:08:44

I got this:

(cats/->>= 
   (maybe/just "")
   (#(exc/try-on (parse-url %)))
   (#(exc/try-on (open-connection %)))
   (#(exc/try-on (to-stream %)))
   (#(exc/try-on (slurp %))))

mping09:08:34

but I’d like to get rid of the anon funcs, but at the same time keep my parse-url, open-connection, etc functions monad-free

mccraigmccraig10:08:27

have you tried cats.core/fmap ?

mccraigmccraig10:08:03

and do you want exc/success rather than maybe/just ?