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

reverse works destructively #4

Closed
nariakiiwatani opened this issue Jul 3, 2020 · 1 comment
Closed

reverse works destructively #4

nariakiiwatani opened this issue Jul 3, 2020 · 1 comment

Comments

@nariakiiwatani
Copy link
Sponsor

function reverse modifies original array since it calls Javascript's destructive reverse.
I don't know if it's Intentional behavior or not, I think it's not Lisp-ish.

reproducible code;

(def array [0 1 2])
(reverse array)
(prn array) ;; [2 1 0]
@nariakiiwatani nariakiiwatani changed the title reverse works destructive reverse works destructively Jul 3, 2020
baku89 added a commit that referenced this issue Jul 4, 2020
@baku89
Copy link
Owner

baku89 commented Jul 4, 2020

Thank you for the issue. I also fixed sort function as well :)

細かい所レビューしてくださって本当に勉強になります…。マジで嬉しいです...!

@baku89 baku89 closed this as completed Jul 4, 2020
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