Fork me on GitHub
#funcool
<
2016-02-01
>
rm07:02:17

hi there

rm07:02:45

I'm trying to build couple of helpers around cats and alet seems to not working for me:

err.core=> (cats.core/fmap inc [1 2 3])
[2 3 4]
err.core=> (cats.core/alet [a 1 b 2] (+ b a))

IllegalArgumentException No context is set and it can not be automatically resolved.  sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)

niwinz07:02:49

the bindings in alet are just longs

niwinz07:02:02

them does not have any context so them can't be used in alet

rm07:02:08

ah cool

rm07:02:21

err.core=> (cats.core/alet [b (ei/left "oops") a (ei/right 1)] (+ b a))
#<Left "oops">
err.core=> (cats.core/alet [b (ei/right 3) a (ei/right 1)] (+ b a))
#<Right 4>