Function: org-babel-processing-define-type

org-babel-processing-define-type is a byte-compiled function defined in ob-processing.el.gz.

Signature

(org-babel-processing-define-type DATA)

Documentation

Determine type of DATA.

DATA is a list. Return type as a symbol.

The type is String if any element in DATA is a string. Otherwise, it is either float, if some elements are floats, or int.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-processing.el.gz
(defun org-babel-processing-define-type (data)
  "Determine type of DATA.

DATA is a list.  Return type as a symbol.

The type is `String' if any element in DATA is a string.
Otherwise, it is either `float', if some elements are floats, or
`int'."
  (letrec ((type 'int)
	   (find-type
	    (lambda (row)
	      (dolist (e row type)
		(cond ((listp e) (setq type (funcall find-type e)))
		      ((stringp e) (throw 'exit 'String))
		      ((floatp e) (setq type 'float)))))))
    (catch 'exit (funcall find-type data))))