Skip to content

Instantly share code, notes, and snippets.

@shajra
Created May 18, 2014 22:38
Show Gist options
  • Save shajra/029b28b22ffbf65558f4 to your computer and use it in GitHub Desktop.
Save shajra/029b28b22ffbf65558f4 to your computer and use it in GitHub Desktop.
What's a recommend refactoring for this Emacs lisp snippet?
; I know this is super naive, but I haven't been in a Lisp for some time, and I
; haven't had to think about how best to deal with a Lisp-1.
;
; Really, all I'm trying to do here is define a local function so it's easier
; to read in the mapcar call.
;
(defun tnks--gnus-ident (idents)
(let
((f (lambda (ident) (list (car ident) nil (cdr ident) nil nil nil))))
(mapcar (lambda (i) (funcall f i)) idents)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment