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

0 and 1 argument results not working for + #61

Closed
jhelmsen opened this issue Jan 22, 2015 · 1 comment
Closed

0 and 1 argument results not working for + #61

jhelmsen opened this issue Jan 22, 2015 · 1 comment

Comments

@jhelmsen
Copy link

The clojure.core + operation generates a 0 for 0 arguments being passed to it, and operates as the identity for 1 argument being passed to it. This makes operations on lists, such as '(apply + (...)) work much more cleanly. It would be good if the matrix + operator acted more like the standard clojure.core + operator, since we would not need to check the number of arguments explicitly before applying it.

@mikera
Copy link
Collaborator

mikera commented Apr 3, 2015

Good idea, I've added in my latest development branch, should merge in soon.

Note that the core.matrix addition operators already work like this.

Thanks!

@mikera mikera closed this as completed Apr 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants