Lawrence Bottorff <borg...@gmail.com> writes:

> The MIT scheme repl is running in the next buffer. . .
>

Did you try it?

--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC scheme :session foo
 (define (mydouble x)
 (+ x x))
#+END_SRC

#+RESULTS:

doesn't seem to remember from one block to the next. So, after defining the 
code above

#+BEGIN_SRC scheme :session foo
 (mydouble 5)
#+END_SRC

#+RESULTS:
: 10
--8<---------------cut here---------------end--------------->8---

Without the session, I get

#+RESULTS
: An error occurred.

instead. This is with guile as the scheme interpreter, but that should
not make any difference.


> On May 28, 2015 2:16 PM, "Nick Dokos" <ndo...@gmail.com> wrote:
>
>     Lawrence Bottorff <borg...@gmail.com> writes:
>    
>     > . . . installed geiser via elpa -- and got some functionality. Although 
> a simple thing like 
>     >
>     > #+BEGIN_SRC scheme
>     > (define (mydouble x)
>     > (+ x x))  
>     >   #+END_SRC
>     >
>     > doesn't seem to remember from one block to the next. So, after defining 
> the code above
>     >
>     > #+BEGIN_SRC scheme
>     > (mydouble 5)
>     >  #+END_SRC
>     >
>     > gives an error, while 
>     >
>     >  #+BEGIN_SRC scheme
>     > (define (mysquare x)
>     >   (* x x))
>     > (mysquare 5)
>     >  #+END_SRC
>     >
>     >   #+RESULTS:
>     >   : 25
>     >
>     > works. Any way to have it remember like a REPL does?
>    
>     Use a session?

Nick


Reply via email to