[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is there no `until' in elisp?
From: |
Stefan Monnier |
Subject: |
Re: Why is there no `until' in elisp? |
Date: |
Wed, 17 Oct 2018 11:06:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> No, `while' currently returns its last body, I just checked:
> (let ((x 0)) (while (< x 5) (setq x (+ 1 x))) 8))
The 8 in your test case is outside of `while`, so it just shows what
`let` returns, not what `while` returns. Try
(let ((x 0)) (while (< x 5) (setq x (+ 1 x))))
or
(let ((x 0)) (while (< x 5) (setq x (+ 1 x)) 8))
-- Stefan
- Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/16
- Re: Why is there no `until' in elisp?, Stefan Monnier, 2018/10/16
- Re: Why is there no `until' in elisp?, Stefan Monnier, 2018/10/19
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/19
Re: Why is there no `until' in elisp?, Yuri Khan, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Yuri Khan, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Paul Eggert, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Paul Eggert, 2018/10/17