Re: [Flashforth-devel] jumping without a return
Brought to you by:
oh2aun
From: Christopher H. <chr...@li...> - 2021-04-22 16:36:06
|
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)) scheme@(guile-user)> (foo) |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|... -----Original Message----- From: Mikael Nordman <mik...@fl...> To: Christopher Howard <chr...@li...> Cc: fla...@li... Subject: Re: [Flashforth-devel] jumping without a return Date: Thu, 22 Apr 2021 19:20:07 +0300 Does the mutual recursion example really work in Scheme ? BR Mikael |