Comment

Comment by yoo-interested

This reminded me of gotchas one can fall to when defining some Lisp macro from scratch. So I decided to test whether rotatef works exactly like Python's multiple assignment:

  (let ((A (vector 2 1)))
    (rotatef (elt A
                  0)
             (elt A
                  (1- (elt A 0))))
    A)
It returns a changed vector as if indexes were saved.

I am not sure which should be considered the right behavior.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton