Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save jordonbiondo/04de55e433355a2ec7c6 to your computer and use it in GitHub Desktop.
;; emacs-lisp-lisp (ell) demmo
(ell
;; define a global var mapcar that is the typical mapcar function
(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))))
(if (= (plus3 10) 13)
(elldo
(print "it's working!")
(print (mapcar plus3 (list 1 2 3))) ;; ell mapcar, will print 'hi 4 times before printing result
(let ((mapcar '(native . mapcar)))
(mapcar plus3 (list 4 5 6))))))) ;; emacs lisp mapcar
;; output
"it's working!"
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