Skip to content

Faulty suggestions for do. #219

Open

Description

@leppaott
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

Activity

  1. thobbs commented on Jan 14, 2019

    @thobbs
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions