dash.el icon indicating copy to clipboard operation
dash.el copied to clipboard

Ability to define custom destructorings

Open yyoncho opened this issue 5 years ago • 5 comments

At this point, dash supports 4 different destructoring keyword (keys/hash/plist/alist) and from what I can see it will be not hard to add new keywords by providing a destructuring template(or macro?) to generate the getter.

Example usecases:

  • &hash which checks whether the map is empty before applying gethash
  • Custom destructuring for cl-defstruct, e. g.
(-let [(&my/struct slot1 slot2) value]
  ...)

yyoncho avatar Nov 19 '18 12:11 yyoncho