[CLJS-260] Add clojure.core/shuffle implementation Created: 17/May/12 Updated: 20/May/12 Resolved: 20/May/12 |
|
| Status: | Resolved |
| Project: | ClojureScript |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Evan Mezeske | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | enhancement, patch,, test | ||
| Attachments: |
|
| Patch: | Code and Test |
| Description |
|
I added a simple implementation of clojure.core/shuffle, which uses goog.array's Fisher-Yates for its implementation. Included in the patch is a test to make sure it works. |
| Comments |
| Comment by David Nolen [ 17/May/12 7:07 PM ] |
|
Why don't you return a vector like Clojure does? |
| Comment by Evan Mezeske [ 17/May/12 7:11 PM ] |
|
Return a vector like Clojure. |
| Comment by David Nolen [ 18/May/12 9:23 PM ] |
|
The patch is not correctly formatted with attribution. |
| Comment by Evan Mezeske [ 20/May/12 4:24 PM ] |
|
Use git format-patch instead of git diff, to hopefully provide the right patch format. |
| Comment by David Nolen [ 20/May/12 10:28 PM ] |
|
fixed, http://github.com/clojure/clojurescript/commit/b06905863a9b0ce3618634d8fe0effb3aefd4063 |