Timeline for Mapping a function on the values of a map in Clojure
Current License: CC BY-SA 3.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 9, 2017 at 19:26 | review | Suggested edits | |||
| May 10, 2017 at 5:26 | |||||
| Jan 5, 2017 at 0:43 | comment | added | Ahmed Fasih | Thank you, got it! My thinking for not making the edit directly was this: it’d go to peer review, and most would feel uncomfortable reviewing such a subtle change in an admittedly unusual language—some might suspect I was vandalizing... So I pinged you 😇 if you hadn’t responded, I’d probably have risked an edit 🙇! | |
| Jan 5, 2017 at 0:37 | history | edited | Arthur Ulfeldt | CC BY-SA 3.0 |
Fixed ) placement in first example
|
| Jan 5, 2017 at 0:37 | comment | added | Arthur Ulfeldt | Thanks @AhmedFasih that mistake has been sitting there for more then 7 years! (And you are free to edit these things directly as well) | |
| Jan 5, 2017 at 0:14 | comment | added | Ahmed Fasih |
Typo in the first code snippet: one paren after do-stuff %) should be moved to the end of the line.
|
|
| Feb 10, 2016 at 6:59 | comment | added | Jouni K. Seppänen | @Jason Yeah, they added this to the documentation in version 1.6 I think. dev.clojure.org/jira/browse/CLJ-1302 | |
| Feb 9, 2016 at 15:36 | comment | added | Jason |
@JouniK.Seppänen, I share your concern and in fact it is documented in vals and keys that the order is the same as seq. Doc for vals: "Returns a sequence of the map's values, in the same order as (seq map)." Doc for keys: "Returns a sequence of the map's keys, in the same order as (seq map)." The links where I got those are clojuredocs.org/clojure.core/vals and clojuredocs.org/clojure.core/keys, respectively.
|
|
| Dec 10, 2014 at 21:42 | history | edited | Dax Fohl | CC BY-SA 3.0 |
added 1 character in body
|
| Feb 29, 2012 at 19:31 | history | edited | user35288 | CC BY-SA 3.0 |
change `data` to `m`
|
| Jan 17, 2012 at 0:26 | comment | added | AnnanFay |
The function example should have (vals m)
|
|
| Mar 29, 2011 at 10:40 | comment | added | Jouni K. Seppänen | That does seem to be the case, but is it documented anywhere? At least the docstrings for keys and vals fail to mention this. I would be more comfortable using this if I could point to some official documentation that promises it's going to work. | |
| Nov 5, 2009 at 14:25 | comment | added | Chouser | Rob: yes, keys and vals will use the same order for all maps -- the same order as a seq on the map uses. Since hash, sorted, and array maps are all immutable, there's no chance of the order changing in the mean time. | |
| Nov 5, 2009 at 7:22 | comment | added | Rob Lachlan | Are we guaranteed that keys and vals return the corresponding values in the same order? For both sorted maps and hash maps? | |
| Nov 5, 2009 at 5:42 | vote | accept | Thomas | ||
| Nov 5, 2009 at 5:42 | |||||
| Nov 4, 2009 at 23:31 | comment | added | Thomas | It irritates me that I have to supply the keys for it, but it's not a high price to pay. It definitely looks a lot nicer than my original suggestion. | |
| Nov 4, 2009 at 22:24 | history | edited | Arthur Ulfeldt | CC BY-SA 2.5 |
added 133 characters in body
|
| Nov 4, 2009 at 22:18 | history | answered | Arthur Ulfeldt | CC BY-SA 2.5 |