First let's look at a very simple example. The following source
code block defines a function, using python, that squares its argument.
-#+name: square(x=0)
+#+name: square
+#+header: :var x=0
#+begin_src python
return x*x
#+end_src
In the Org-mode file, the function looks like this:
-: #+name: square(x)
+: #+name: square
+: #+header: :var x=0
: #+begin_src python
: return x*x
: #+end_src
#+results: square(x=6)
: 36
+
*** A more complex example using an Org-mode table as input
In this example we define a function called =fibonacci-seq=, using