Skip to content

Instantly share code, notes, and snippets.

@boxxxie
Created February 7, 2013 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxxxie/4735021 to your computer and use it in GitHub Desktop.
Save boxxxie/4735021 to your computer and use it in GitHub Desktop.
destructuring problem. I want to convert the `body` and `content-length` into keys form, and keep the existing keys form for params
;;original that works
[{{:keys [company-id file-name ext]} :params body :body content-length :content-length}]
;;both of the below throw errors
[{{:keys [company-id file-name ext]} :params {:keys [body content-length]}}]
[{:keys [body content-length params] {{:keys [company-id file-name ext]} :params}}]
@gfredericks
Copy link

[{{:keys [company-id file-name ext]} :params :keys [body content-length]}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment