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

Faulty suggestions for do. #219

Open
leppaott opened this issue Oct 11, 2018 · 1 comment
Open

Faulty suggestions for do. #219

leppaott opened this issue Oct 11, 2018 · 1 comment

Comments

@leppaott
Copy link

Consider using:
  {:category (key p1__328908#), :total (val p1__328908#)}
instead of:
  (do {:category (key p1__328908#), :total (val p1__328908#)})

Do cannot be removed from an anonymous function:
(map #(do {:fine %}) col)

https://stackoverflow.com/questions/37734468/constructing-a-map-on-anonymous-function-in-clojure

@thobbs
Copy link
Contributor

thobbs commented Jan 14, 2019

FYI, you can just do this as a workaround (and arguably better code style):

(map #(hash-map :fine %) col)

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