Re: [Flashforth-devel] jumping without a return
Brought to you by:
oh2aun
|
From: Mikael N. <mik...@fl...> - 2021-04-22 18:28:16
|
What I meant to ask was if the the cross function tail jump works when
using eval("foo") at the tail ?
On 2021-04-22 19:35, Christopher Howard wrote:
> It works fine so long as the procedure call is at the end of calling procedure. Scheme standard guarantees tail call optimization. In other cases you might get a return stack overflow.
>
> When you define the first of the two procedures, you get a warning that the other procedure might not be defined. Or at least this is how it works in Guile scheme:
>
> scheme@(guile-user)> (define (foo) (display "|") (sleep 1) (bar))
> ;;; <stdin>:13:38: warning: possibly unbound variable `bar'
> scheme@(guile-user)> (define (bar) (display "-") (sleep 1) (foo)) |