funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
rm 2016-02-01T07:47:17.000165Z

hi there

rm 2016-02-01T07:48:45.000166Z

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)

niwinz 2016-02-01T07:51:49.000167Z

the bindings in alet are just longs

niwinz 2016-02-01T07:52:02.000168Z

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

rm 2016-02-01T07:55:08.000170Z

ah cool

rm 2016-02-01T07:55:21.000171Z

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>