Skip to content

Instantly share code, notes, and snippets.

@jordonbiondo
Created June 6, 2014 13:04
Show Gist options
  • Select an option

  • Save jordonbiondo/aa068831871a117a8d14 to your computer and use it in GitHub Desktop.

Select an option

Save jordonbiondo/aa068831871a117a8d14 to your computer and use it in GitHub Desktop.
;; emacs-lisp-lisp (ell) demmo
(ell
(setq mapcar
(lambda (fn data)
(print 'hi)
(if (null data)
nil
(cons (fn (car data))
(mapcar fn (cdr data)))))))
(ell
(let ((plus3 (lambda (x) (+ x 3))))
(print (mapcar plus3 (list 1 2 3))) ;; ell mapcar, will print 'hi 3 times before printing result
(let ((mapcar '(native . mapcar)))
(mapcar plus3 (list 4 5 6))))) ;; emacs lisp mapcar
;;output
hi
hi
hi
hi
(4 5 6)
(7 8 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment