Created
August 29, 2011 17:49
-
-
Save eschulte/1178933 to your computer and use it in GitHub Desktop.
This file contains 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
#+source: hetero-table | |
#+begin_src emacs-lisp | |
'((1 2 3 4) | |
("a" "b" "c" "d")) | |
#+end_src | |
#+source: all-to-string | |
#+begin_src emacs-lisp :var tbl='() | |
(defun all-to-string (tbl) | |
(if (listp tbl) | |
(mapcar #'all-to-string tbl) | |
(if (stringp tbl) | |
tbl | |
(format "%s" tbl)))) | |
(all-to-string tbl) | |
#+end_src | |
#+begin_src emacs-lisp :var tbl=hetero-table | |
(mapcar (lambda (row) (mapcar (lambda (cell) (stringp cell)) row)) tbl) | |
#+end_src | |
#+results: | |
| nil | nil | nil | nil | | |
| t | t | t | t | | |
#+begin_src emacs-lisp :var tbl=all-to-string(hetero-table) | |
(mapcar (lambda (row) (mapcar (lambda (cell) (stringp cell)) row)) tbl) | |
#+end_src | |
#+results: | |
| t | t | t | t | | |
| t | t | t | t | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment