Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created February 22, 2018 13:49
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 AeroNotix/72718ba0d546c960603700cba0783b19 to your computer and use it in GitHub Desktop.
Save AeroNotix/72718ba0d546c960603700cba0783b19 to your computer and use it in GitHub Desktop.
(defmacro --map (form list)
"Anaphoric form of `-map'."
(declare (debug (form form)))
`(mapcar (lambda (it) ,form) ,list))
;; used like this:
(defun edts-project--validate-config (config)
(-when-let* ((invalid (-remove #'edts-project--valid-property? config))
(invalid-keys (--map (car it) invalid)))
(error (format "Invalid configuration properties: %s" invalid)))
config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment