Fork me on GitHub
Nikolas Pafitis21:03:36

Is there an option for meander to keep keys that are not specified in the pattern?


{:my-key ?my-key & ?rest}

Nikolas Pafitis21:03:59

then how would i use ?rest in the output expression?


Yes. (Sorry on my phone so hard to give a full example)

Nikolas Pafitis21:03:59

I did something like this and it works but is there a better way?

(meander/match props
    {:color-scheme ?color-scheme & ?rest}
    (merge {:color ?color-scheme}


With match that works. With m/rewrite you could get rid of the merge and should be able to just write {:color ?color-scheme & ?rest } for the output.

Nikolas Pafitis21:03:24

I see, thanks that works great!