[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Babel: verbatim results yield a table
From: |
Jarmo Hurri |
Subject: |
[O] Babel: verbatim results yield a table |
Date: |
Thu, 02 Aug 2018 15:19:06 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Greetings.
The org manual states that in the :results header argument of a block
verbatim Interpret literally and insert as quoted text. Do not create a
table. Usage example: :results value verbatim
The quote above is from https://orgmode.org/manual/results.html
Given this description, I am trying to understand the result below from
a Scheme snippet (this is an exercise in the good old SICP). In
particular, why is the table created from the (nested) list?
Jarmo
#+BEGIN_SRC scheme :exports both :results value verbatim
(define (deep-reverse lst)
(define (deep-iter lst result)
(if (null? lst)
result
(let ((first (car lst)) (rest (cdr lst)))
(deep-iter rest
(cons (if
(pair? first)
(deep-reverse first)
first)
result)))))
(deep-iter lst '()))
(deep-reverse (list (list 1 2 3 4) (list (list 5 6) 7 8)))
#+END_SRC
#+RESULTS:
| 8 | 7 | (6 5) | |
| 4 | 3 | 2 | 1 |
- [O] Babel: verbatim results yield a table,
Jarmo Hurri <=