[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: named-let

From: Helmut Eller
Subject: Re: named-let
Date: Sat, 09 Jan 2021 18:03:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Sat, Jan 09 2021, Stefan Monnier wrote:

>> Is TCO always used (like in Scheme) or in which cases is it used or not used?
> It's basically never used.  It's only applied for the particular case of
> tail recursive calls to functions defined by `cl-labels` and only for
> those calls that are "self-recursive" (i.e. come from within the code of
> that function).

Is there hope for general contification? So that things like

(defun my-even? (x)
  (cl-labels ((even? (x) (or (= x 0) (odd? (1- x))))
              (odd?  (x) (or (= x 1) (even? (1- x)))))
    (even? x)))

are translated to a bunch of gotos and no lambdas.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]