Created
June 6, 2014 13:04
-
-
Save jordonbiondo/aa068831871a117a8d14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; 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