[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Unit test table
From: |
Aaron Ecay |
Subject: |
Re: [O] Unit test table |
Date: |
Sat, 06 Feb 2016 22:31:45 +0000 |
User-agent: |
Notmuch/0.21+33~g570c0ae (http://notmuchmail.org) Emacs/25.0.50.2 (x86_64-unknown-linux-gnu) |
Hi Eduardo,
2016ko otsailak 4an, Eduardo Bellani-ek idatzi zuen:
>
> Hey guys. I've posted this question in the irc-channel, but I had to
> leave before I could strike a conversation with the the nice volunteer
> who answered my question. I hope that email can preserve the
> conversation :)
>
> So, I have a table who's purpose is to demonstrate the working of different
> versions of the same code, perhaps in different languages. This is a
> working model:
>
> https://gist.github.com/ebellani/7c70d16f06076e4fc375
>
> as you can see, there's repetition and the TBLFM is huge.
>
> Anyone has an idea of a better way to achieve similar results?
Use babel:
#+name: my-input
| el | value | expected |
|----+------------+----------|
| 5 | '(5 5 5 5) | 4 |
| ...etc... |
#+begin_src elisp :var input=my-input :results table
;; Code that does the calculations in your tblfm line
;; `input' is a variable holding your input table
#+end_src
--
Aaron Ecay