Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/alet works in unexpected way #175

Open
s-mage opened this issue Aug 13, 2016 · 1 comment
Open

core/alet works in unexpected way #175

s-mage opened this issue Aug 13, 2016 · 1 comment
Labels

Comments

@s-mage
Copy link

s-mage commented Aug 13, 2016

Hi!

Seems like when one of alet args in not wrapped into monad it returns the value of the last of that arg.
Better show than explain:

err.core=> (alet [a (ei/right 1) b (inc a)] 42)
2
err.core=> (alet [a (ei/right 1) b (ei/right (inc a))] 42)
#<Right 42>
err.core=> (alet [a (ei/right 1) b (inc a) c (+ b 4)] 42)

IllegalArgumentException No context is set and it can not be automatically resolved from provided value  cats.context/throw-illegal-argument (context.cljc:32)
err.core=> (alet [a (ei/right 1) b (inc a) c (+ a 4)] 42)
2

I think it should raise exception in all that cases.

@niwinz
Copy link
Member

niwinz commented Aug 16, 2016

You are right.

@niwinz niwinz added the bug label Aug 16, 2016
@ghost ghost self-assigned this Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants