Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check consistency of numbers #204

Open
okamsn opened this issue Aug 22, 2024 · 1 comment
Open

Check consistency of numbers #204

okamsn opened this issue Aug 22, 2024 · 1 comment
Labels
bug? This might be a bug validation Things that should raise/prevent errors

Comments

@okamsn
Copy link
Owner

okamsn commented Aug 22, 2024

The following in SBCL 2.1.11 produces 3.

     (loop for i in '(1 2 3)
           for j from 1
           finally (return j))

The following in Emacs 29 produces 4.

     (cl-loop for i in '(1 2 3)
              for j from 1
              finally (cl-return j))

What does Loopy produce, with and without with binding? Are the two results the same? Which answer should we expect?

@okamsn okamsn added validation Things that should raise/prevent errors bug? This might be a bug labels Aug 22, 2024
@okamsn
Copy link
Owner Author

okamsn commented Aug 24, 2024

Confirmed that Loopy currently returns a different value depending on whether it is with bound.

;; => 3
(loopy (with (j 0))
       (numbers j :from 0 :to 3)
       (finally-return j))

;; => 4
(loopy (numbers j :from 0 :to 3)
       (finally-return j))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? This might be a bug validation Things that should raise/prevent errors
Projects
None yet
Development

No branches or pull requests

1 participant